This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/62053] [5 Regression] ICE: in remap_type_1, at tree-inline.c:540
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 13 Oct 2014 09:21:56 +0000
- Subject: [Bug tree-optimization/62053] [5 Regression] ICE: in remap_type_1, at tree-inline.c:540
- Auto-submitted: auto-generated
- References: <bug-62053-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62053
--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
I am testing the following
Index: tree.c
===================================================================
--- tree.c (revision 216141)
+++ tree.c (working copy)
@@ -863,12 +863,12 @@ build_cplus_array_type (tree elt_type, t
{
t = build_min_array_type (elt_type, index_type);
set_array_type_canon (t, elt_type, index_type);
- if (!dependent)
- layout_type (t);
TYPE_MAIN_VARIANT (t) = m;
TYPE_NEXT_VARIANT (t) = TYPE_NEXT_VARIANT (m);
TYPE_NEXT_VARIANT (m) = t;
+ if (!dependent)
+ layout_type (t);
}
}
the problem here is that calling layout_type before linking variants makes it
to biuld separate (but equivalent) experessions representing size/size_unit for
the variant. The assert in tree-inline check that type and its variants have
same sizes that should always be true.