This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/29436] [4.0/4.1/4.2 Regression] ICE in modified_type_die
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Oct 2006 12:33:33 -0000
- Subject: [Bug debug/29436] [4.0/4.1/4.2 Regression] ICE in modified_type_die
- References: <bug-29436-12219@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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