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: do...@gcc.gnu.org
        ReportedBy: do...@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.

Reply via email to