Compile this with g++ -g:

int var;

You'll see this in the readelf -wi output:

 <1><6e>: Abbrev Number: 2 (DW_TAG_namespace)
     DW_AT_sibling     : <86>   
     DW_AT_name        : ::
     DW_AT_decl_file   : 1
     DW_AT_decl_line   : 0
 <2><78>: Abbrev Number: 3 (DW_TAG_variable)
     DW_AT_name        : var

We should not be emitting a namespace DIE for the global namespace.  This is a
regression from GCC 3.3 (I didn't check GCC 3.4, but did check 4.0 and 4.1).


-- 
           Summary: [4.0/4.1/4.2 Regression] g++ emits bogus namespace DIE
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: drow at gcc dot gnu dot org
  GCC host triplet: x86_64-pc-linux-gnu


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

Reply via email to