This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/44188] New: Fails to produce DW_AT_typedef for typedef of anonymous struct


typedef struct
{
        int i;
} AAA;

typedef struct BBB
{
        int i;
} BBB;

int main(void) {
        BBB bb;
        AAA aa;
        return 0;
}

produces

 <3><a2>: Abbrev Number: 9 (DW_TAG_variable)
    <a3>   DW_AT_name        : bb       
    <a6>   DW_AT_decl_file   : 1        
    <a7>   DW_AT_decl_line   : 13       
    <a8>   DW_AT_type        : <0x66>   
    <ac>   DW_AT_location    : 2 byte block: 91 60      (DW_OP_fbreg: -32)
 <3><af>: Abbrev Number: 9 (DW_TAG_variable)
    <b0>   DW_AT_name        : aa       
    <b3>   DW_AT_decl_file   : 1        
    <b4>   DW_AT_decl_line   : 14       
    <b5>   DW_AT_type        : <0x2d>   
    <b9>   DW_AT_location    : 2 byte block: 91 50

where

 <1><66>: Abbrev Number: 6 (DW_TAG_typedef)
    <67>   DW_AT_name        : BBB      
    <6b>   DW_AT_decl_file   : 1        
    <6c>   DW_AT_decl_line   : 10       
    <6d>   DW_AT_type        : <0x4d>   

(good)

 <1><2d>: Abbrev Number: 2 (DW_TAG_structure_type)
    <2e>   DW_AT_byte_size   : 4        
    <2f>   DW_AT_decl_file   : 1        
    <30>   DW_AT_decl_line   : 3        
    <31>   DW_AT_name        : AAA      
    <35>   DW_AT_sibling     : <0x46>   

(bad)

This seems to be because in gen_type_die_with_usage we arrive with a
type that has a non-typedef type-decl as its name.


-- 
           Summary: Fails to produce DW_AT_typedef for typedef of anonymous
                    struct
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: wrong-debug
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]