This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/47510] New: DW_TAG_typedef can have children when designating a naming typedef
- From: "dodji at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 28 Jan 2011 11:09:02 +0000
- Subject: [Bug debug/47510] New: DW_TAG_typedef can have children when designating a naming typedef
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47510
Summary: DW_TAG_typedef can have children when designating a
naming typedef
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
AssignedTo: dodji@gcc.gnu.org
ReportedBy: dodji@gcc.gnu.org
Consider this test case:
class C {
public:
C() {}
~C() {}
};
typedef struct {
C m;
} t;
typedef t s;
s v;
The DW_TAG_typedef DIE describing the typedef t has children DIEs. The
children DIEs are actually the DIEs representing the members of the
anonymous structure named by T.
What is happening is, since gen_typedef_die equates the anonymous
struct named by the typedef t with the DIE of the naming typedef,
get_context_die called with the type tree of the anonymous typedef
yields the DIE of the typedef.