Message ID | AANLkTikmUdQx7i4gQcPNk+YtCfLqYE0NVEhmkhPGX25P@mail.gmail.com |
---|---|
State | New |
Headers | show |
On 11/01/2011 21:52, Kai Tietz wrote: >>>> PR debug/47209 >>>> * dwarfout2.c (should_emit_struct_debug): Use TYPE_MAIN_VARIANT >>>> of type. > - type_decl = TYPE_STUB_DECL (type); > + type_decl = TYPE_STUB_DECL(TYPE_MAIN_VARIANT(type)); ^ ^ Missing spaces before the open brackets. cheers, DaveK
Index: gcc/gcc/dwarf2out.c =================================================================== --- gcc.orig/gcc/dwarf2out.c 2011-01-11 22:26:26.000000000 +0100 +++ gcc/gcc/dwarf2out.c 2011-01-11 21:57:09.704996700 +0100 @@ -619,7 +619,7 @@ if (criterion == DINFO_STRUCT_FILE_ANY) return DUMP_GSTRUCT (type, usage, criterion, generic, false, true); - type_decl = TYPE_STUB_DECL (type); + type_decl = TYPE_STUB_DECL(TYPE_MAIN_VARIANT(type)); if (criterion == DINFO_STRUCT_FILE_SYS && DECL_IN_SYSTEM_HEADER (type_decl)) return DUMP_GSTRUCT (type, usage, criterion, generic, false, true); Index: gcc/gcc/testsuite/g++.dg/debug/pr47209.C =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ gcc/gcc/testsuite/g++.dg/debug/pr47209.C 2011-01-11 22:50:36.703426500 +0100 @@ -0,0 +1,12 @@ +// { dg-do compile } +// { dg-options "-femit-struct-debug-baseonly" } +struct A +{ + void foo (); +}; + +struct B : A +{ + typedef const A base; + using base::foo; +};