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



             Bug #: 55059

           Summary: DWARF missing concrete class definition

    Classification: Unclassified

           Product: gcc

           Version: unknown

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: debug

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: tro...@gcc.gnu.org





Created attachment 28519

  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28519

test program



This comes from http://sourceware.org/bugzilla/show_bug.cgi?id=14760



I think GCC master from today generates invalid, or at least

questionable, DWARF for the attached test case.

This causes gdb test suite failures.



The bug is in the DWARF for the instantiation of Base.

Current GCC emits:



 <1><f1>: Abbrev Number: 15 (DW_TAG_structure_type)

    <f2>   DW_AT_name        : (indirect string, offset: 0x191): Base<long int,

47, (& a_global), &S::f>    

    <f6>   DW_AT_byte_size   : 1    

    <f7>   DW_AT_decl_file   : 1    

    <f8>   DW_AT_decl_line   : 30    

    <f9>   DW_AT_declaration : 1    

    <f9>   DW_AT_sibling     : <0x155>    



This has DW_AT_declaration -- but there is no concrete instance of the type.



Previous versions of GCC omitted this attribute.  For example, Fedora 16

GCC:



 <1><f1>: Abbrev Number: 10 (DW_TAG_structure_type)

    <f2>   DW_AT_name        : (indirect string, offset: 0x135): Base<long int,

47, (& a_global), &S::f>    

    <f6>   DW_AT_byte_size   : 1    

    <f7>   DW_AT_decl_file   : 1    

    <f8>   DW_AT_decl_line   : 30    

    <f9>   DW_AT_sibling     : <0x155>    



I think the previous approach is preferable.

Reply via email to