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

Alexandre Oliva <aoliva at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.11.21 09:23:01
          Component|debug                       |c++
     Ever Confirmed|0                           |1

--- Comment #3 from Alexandre Oliva <aoliva at gcc dot gnu.org> 2010-11-21 
09:23:01 UTC ---
Indeed, not a typical -fcompare-debug error.

I looked a bit into the second testcase.  The problem is that finish_struct
calls debughooks->type_decl through finish_struct_1 and
rest_of_type_compilation, and within dbxout_type_decl we compute the
assembler_name for the type and nested decls.  Later on, when we override the
class name when processing the typedef name for the still anonymous class, the
assembler names are not touched, and remain with incorrect name mangling.

I can't decide whether this is a problem in the C++ front end, that should call
rest_of_type_compilation only at the end of the typedef declaration, or in
dbxout, that should refrain from resolving assembler names of anonymous types
before the end of compilation, if that's at all possible.  I don't know much
about stabs, so I'll leave this to someone else who does.

Reassigning to c++ in the hope that some g++ expert will chime in.

Reply via email to