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]

[Bug debug/29436] [4.0/4.1/4.2 Regression] ICE in modified_type_die



------- Comment #5 from rguenth at gcc dot gnu dot org  2006-10-17 12:33 -------
We're getting a type variant with the attribute created which shares TYPE_NAME
which in turn points back to the wrong (un-attributed) type.  So we do not
create a die for the attributed type.

This can be worked around with

Index: tree.c
===================================================================
*** tree.c      (revision 117822)
--- tree.c      (working copy)
*************** build_type_attribute_variant (tree ttype
*** 3310,3315 ****
--- 3310,3320 ----

        ntype = type_hash_canon (hashcode, ntype);
        ttype = build_qualified_type (ntype, TYPE_QUALS (ttype));
+       if (TYPE_NAME (ttype))
+       {
+           TYPE_NAME (ttype) = copy_node (TYPE_NAME (ttype));
+           TREE_TYPE (TYPE_NAME (ttype)) = ttype;
+       }
      }

    return ttype;

after which we have the same situation as currently on mainline (cc1plus
segfaults, cc1 is fine).

I guess something fixed this on the mainline - any idea what?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29436


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