I'm using gcc svn trunk as of yesterday.

Consider this test case:

struct S {
  typedef int sint;

  struct Q { };

  template<typename Z> struct T { };
};

S sval;
S::sint sintval;
S::Q qval;
S::T<int> tval;


In the generated DWARF, "sint" and "Q" are child DIEs of the DIE for S, e.g.:

 <1><25>: Abbrev Number: 2 (DW_TAG_structure_type)
    <26>   DW_AT_name        : S        
[...]
 <2><2f>: Abbrev Number: 3 (DW_TAG_structure_type)
    <30>   DW_AT_name        : Q        

However, this is not the case for S::T<int>:

 <1><48>: Abbrev Number: 6 (DW_TAG_structure_type)
    <49>   DW_AT_name        : (indirect string, offset: 0x18): T<int>


-- 
           Summary: wrong nesting for inner template class
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tromey at gcc dot gnu dot org


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

Reply via email to