This is the mail archive of the gcc-patches@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]

Fix debug/45171


Following 

2010-05-25  Dodji Seketeli  <dodji@redhat.com>

        PR c++/44188
        * c-common.c (is_typedef_decl): Move this definition ...
        * tree.c (is_typedef_decl): ... here.
        (typdef_variant_p): Move definition here from gcc/cp/tree.c.
        * c-common.h (is_typedef_decl): Move this declaration ...
        * tree.h (is_typedef_decl): ... here.
        (typedef_variant_p): Move declaration here from gcc/cp/cp-tree.h
        * dwarf2out.c (is_naming_typedef_decl): New function.
        (gen_tagged_type_die): Split out of ...
        (gen_type_die_with_usage): ... this function. When an anonymous
        tagged type is named by a typedef, make sure a DW_TAG_typedef DIE
        is emitted for the typedef.
        (gen_typedef_die): Emit DW_TAG_typedef also for typedefs naming
        anonymous tagged types.

The test case shows a path through gen_typedef_die for which the unnamed
type had already been emitted.  "Emitting" it again results in duplicate
attributes being added to the existing die.

In the future, I hope that we can (optionally) incorporate dwarflint into
the gcc testsuite, at least within dwarf2.exp.  Talking with Roland, it
isn't quite ready for that yet.

Tested on x86_64-linux.


r~

Attachment: d-45171
Description: Text document


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