public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/44188]  New: Fails to produce DW_AT_typedef for typedef of anonymous struct
@ 2010-05-18  9:32 rguenth at gcc dot gnu dot org
  2010-05-18 21:50 ` [Bug c++/44188] " dodji at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-18  9:32 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-06-06 18:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-18  9:32 [Bug c++/44188] New: Fails to produce DW_AT_typedef for typedef of anonymous struct rguenth at gcc dot gnu dot org
2010-05-18 21:50 ` [Bug c++/44188] " dodji at gcc dot gnu dot org
2010-05-20 11:07 ` dodji at gcc dot gnu dot org
2010-05-27 19:30 ` dodji at gcc dot gnu dot org
2010-05-27 19:36 ` dodji at gcc dot gnu dot org
2010-05-27 20:51 ` jakub at gcc dot gnu dot org
2010-05-28  0:03 ` dodji at gcc dot gnu dot org
2010-05-28  0:08 ` dodji at gcc dot gnu dot org
2010-06-05 20:03 ` dodji at gcc dot gnu dot org
2010-06-05 20:03 ` dodji at gcc dot gnu dot org
2010-06-06 18:25 ` dodji at gcc dot gnu dot org
2010-06-06 18:33 ` dodji at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).