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


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

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