This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: debug/6436: dwarf2out ICE with typedef using attributes
- From: Jason Merrill <jason at redhat dot com>
- To: Daniel Berlin <dberlin at dberlin dot org>
- Cc: jakub at gcc dot gnu dot org, <gcc-bugs at gcc dot gnu dot org>, <meissner at suse dot de>,<gcc-gnats at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org,Mark Mitchell <mark at codesourcery dot com>,Richard Sandiford <rsandifo at redhat dot com>
- Date: Mon, 29 Apr 2002 18:47:02 +0100
- Subject: Re: debug/6436: dwarf2out ICE with typedef using attributes
- References: <Pine.LNX.4.44.0204291242220.6536-100000@dberlin.org>
This fix seems reasonable; I'll apply it after testing. I'm a bit
uncomfortable with the typedef pointing to its own type, though; what do
other people think the effect of Jakub's testcase should be?
Richard Sandiford's recent patch tries to deal with this sort of situation
by separating the typedef type and underlying struct type; why isn't that
working here?
2002-04-29 Jason Merrill <jason@redhat.com>
* dwarf2out.c (gen_type_die): Don't recurse on a self-referential
typedef.
*** dwarf2out.c.~1~ Mon Apr 29 18:39:20 2002
--- dwarf2out.c Mon Apr 29 18:15:37 2002
*************** gen_type_die (type, context_die)
*** 11068,11074 ****
return;
if (TYPE_NAME (type) && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
! && DECL_ORIGINAL_TYPE (TYPE_NAME (type)))
{
TREE_ASM_WRITTEN (type) = 1;
gen_decl_die (TYPE_NAME (type), context_die);
--- 11068,11075 ----
return;
if (TYPE_NAME (type) && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
! && DECL_ORIGINAL_TYPE (TYPE_NAME (type))
! && DECL_ORIGINAL_TYPE (TYPE_NAME (type)) != type)
{
TREE_ASM_WRITTEN (type) = 1;
gen_decl_die (TYPE_NAME (type), context_die);