http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51650

--- Comment #18 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-23 
11:45:53 UTC ---
Even for

struct T;
struct C
{
    typedef ::T T;
    static T *m ()
      {
        static T *d __attribute__((used));
        return d;
      }
};
int
fn ()
{
  C::m ();
}
int main() {}

the C++ frontend works fine with -fwhole-program -g, outputting debug
information for C::m()::d (but in a way not accessible to gdb - huh):

16      int main() {}
(gdb) ptype 'C::m()::d' 
type = <data variable, no debug info>
(gdb) p 'C::m()::d' 
$1 = 0

Reply via email to