https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67664

            Bug ID: 67664
           Summary: [6 Regression] Duplicate AT_const_value attributes in
                    some c++ cases.
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iains at gcc dot gnu.org
  Target Milestone: ---

[AFAICT] between 227779 and 227800 a change was introduced that causes multiple
instances of AT_const_value to be inserted in some DIEs.

This is picked up by Darwin's dsymutil and results in wide-spread fails in the
libstdc++ test suite for both m32 and m64.

The duplicate is not detected by binutils ld, but appears to be present on a
current build of x86_64-linux-gnu.

testcase libstdc++/17_intro/freestanding.cc:

linux (r227958):
 <2><398>: Abbrev Number: 25 (DW_TAG_structure_type)
    <399>   DW_AT_name        : (indirect string, offset: 0x7be):
numeric_limits<long int>
    <39d>   DW_AT_byte_size   : 1
    <39e>   DW_AT_decl_file   : 8
    <39f>   DW_AT_decl_line   : 1132
    <3a1>   DW_AT_sibling     : <0x578>
 <3><3a5>: Abbrev Number: 26 (DW_TAG_member)
    <3a6>   DW_AT_name        : (indirect string, offset: 0x75f):
is_specialized
    <3aa>   DW_AT_decl_file   : 8
    <3ab>   DW_AT_decl_line   : 1134
    <3ad>   DW_AT_type        : <0xc81>
    <3b1>   DW_AT_external    : 1
    <3b1>   DW_AT_declaration : 1
    <3b1>   DW_AT_const_value : 1
    <3b2>   DW_AT_const_value : 1
 <3><3b3>: Abbrev Number: 26 (DW_TAG_member)
    <3b4>   DW_AT_name        : (indirect string, offset: 0x503): digits
    <3b8>   DW_AT_decl_file   : 8
    <3b9>   DW_AT_decl_line   : 1147
    <3bb>   DW_AT_type        : <0x8dd>
    <3bf>   DW_AT_external    : 1
    <3bf>   DW_AT_declaration : 1
    <3bf>   DW_AT_const_value : 63
    <3c0>   DW_AT_const_value : 63
 <3><3c1>: Abbrev Number: 26 (DW_TAG_member)

======

Darwin (r227952):
0x000003ff:     TAG_structure_type [14] *
                 AT_name( "numeric_limits<long int>" )
                 AT_byte_size( 0x01 )
                 AT_decl_file(
"/Volumes/Data0/gcc-trunk/libstdc++-v3/include/std/limits" )
                 AT_decl_line( 1132 )
                 AT_sibling( {0x00000835} )

0x00000421:         TAG_member [15]  
                     AT_name( "is_specialized" )
                     AT_decl_file(
"/Volumes/Data0/gcc-trunk/libstdc++-v3/include/std/limits" )
                     AT_decl_line( 1134 )
                     AT_type( {0x000003c8} ( const bool ) )
                     AT_external( 0x01 )
                     AT_declaration( 0x01 )
                     AT_const_value( 0x01 )
                     AT_const_value( 0x01 )

0x0000043c:         TAG_member [15]  
                     AT_name( "digits" )
                     AT_decl_file(
"/Volumes/Data0/gcc-trunk/libstdc++-v3/include/std/limits" )
                     AT_decl_line( 1147 )
                     AT_type( {0x000003cd} ( const int ) )
                     AT_external( 0x01 )
                     AT_declaration( 0x01 )
                     AT_const_value( 0x1f )
                     AT_const_value( 0x1f )

Reply via email to