aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2015-01-16 05:45:53 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2015-01-16 04:45:53 +0000
commit679337288c80140fefbe682cb85cbff7bc271bc0 (patch)
treedbd35ebcece2310bbbff1d78571226678b1fd946
parent63e533ecb591c271cf1baefd77b4ec4784ea08be (diff)
downloadgcc-679337288c80140fefbe682cb85cbff7bc271bc0.zip
gcc-679337288c80140fefbe682cb85cbff7bc271bc0.tar.gz
gcc-679337288c80140fefbe682cb85cbff7bc271bc0.tar.bz2
re PR tree-optimization/62053 (ICE: in remap_type_1, at tree-inline.c:540)
PR tree-optimization/62053 * tree.c (build_cplus_array_type): Layout type after variants are set. From-SVN: r219705
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/tree.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 889f3c1..146d2ff 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-15 Jan Hubicka <hubicka@ucw.cz>
+
+ PR tree-optimization/62053
+ * tree.c (build_cplus_array_type): Layout type after variants are set.
+
2015-01-15 Jakub Jelinek <jakub@redhat.com>
* cp-gimplify.c (cp_genericize_r): Call
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 80f2ce6..afb57a3 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -881,12 +881,12 @@ build_cplus_array_type (tree elt_type, tree index_type)
{
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);
}
}