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: Tue, 30 Apr 2002 18:48:33 +0100
- Subject: Re: debug/6436: dwarf2out ICE with typedef using attributes
- References: <Pine.LNX.4.44.0204291417040.3511-100000@dberlin.org><wvlpu0hjyi8.fsf@prospero.cambridge.redhat.com>
>>>>> "Jason" == Jason Merrill <jason@redhat.com> writes:
> One fix would be to not give the name 'A' to the anonymous struct.
Thus. I've added Jakub's testcase to the testsuite as
g++.dg/debug/typedef1.C.
Booted and tested i686-pc-linux-gnu, applied trunk and 3.1.
2002-04-30 Jason Merrill <jason@redhat.com>
* decl.c (grokdeclarator): Don't override TYPE_NAME of an
anonymous class with a typedef if there are attributes.
*** decl.c.~1~ Tue Apr 30 14:06:13 2002
--- decl.c Tue Apr 30 18:21:09 2002
*************** grokdeclarator (declarator, declspecs, d
*** 11275,11280 ****
--- 11275,11282 ----
&& TYPE_NAME (type)
&& TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
&& TYPE_ANONYMOUS_P (type)
+ /* Don't do this if there are attributes. */
+ && (!attrlist || !*attrlist)
&& cp_type_quals (type) == TYPE_UNQUALIFIED)
{
tree oldname = TYPE_NAME (type);