OSDN Git Service

Fix PR c++/44188
authordodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 May 2010 19:29:53 +0000 (19:29 +0000)
committerdodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 May 2010 19:29:53 +0000 (19:29 +0000)
commit15a007df5edd3e7f2c80d11b4d01d1ff66c63f3a
tree85cd9f4c3157b4e1df56ba7dba909e3e7b46435f
parent8ee76a8d4bc70282a00eb456d70adbcef2f02c38
Fix PR c++/44188

gcc/ChangeLog:
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.

gcc/cp/ChangeLog:
PR c++/44188
* cp-tree.h (typedef_variant_p): Move this declaration to
gcc/tree.h.
* tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
* decl.c (grokdeclarator): Do not rename debug info of an
anonymous tagged type named by a typedef.

gcc/testsuite/ChangeLog:
PR c++/44188
* g++.dg/debug/dwarf2/typedef3.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159943 138bc75d-0d04-0410-961f-82ee72b054a4
12 files changed:
gcc/ChangeLog
gcc/c-common.c
gcc/c-common.h
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/tree.c
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/debug/dwarf2/typedef3.C [new file with mode: 0644]
gcc/tree.c
gcc/tree.h