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

Re: debug/6436: dwarf2out ICE with typedef using attributes


>>>>> "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);

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