Consider this test case:

namespace S
{
  int i = 24;

  int f() {
    extern int i;
    return i;
  }
};


When I compile this with g++ svn head (as of a few days ago) I see a
duplicate DW_TAG_variable:

 <2><3d>: Abbrev Number: 4 (DW_TAG_variable)
    <3e>   DW_AT_name        : i        
    <40>   DW_AT_decl_file   : 1        
    <41>   DW_AT_decl_line   : 6        
    <42>   DW_AT_MIPS_linkage_name: (indirect string, offset: 0xb): _ZN1S1iE    
    <46>   DW_AT_type        : <0x5c>   
    <4a>   DW_AT_external    : 1        
    <4b>   DW_AT_declaration : 1        
 <2><4c>: Abbrev Number: 4 (DW_TAG_variable)
    <4d>   DW_AT_name        : i        
    <4f>   DW_AT_decl_file   : 1        
    <50>   DW_AT_decl_line   : 3        
    <51>   DW_AT_MIPS_linkage_name: (indirect string, offset: 0xb): _ZN1S1iE    
    <55>   DW_AT_type        : <0x5c>   
    <59>   DW_AT_external    : 1        
    <5a>   DW_AT_declaration : 1        

I think the first one is bogus, given its line number.


-- 
           Summary: duplicate DW_TAG_variable
           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=45048

Reply via email to