From: Jan Hubicka Date: Fri, 16 Jan 2015 04:45:53 +0000 (+0100) Subject: re PR tree-optimization/62053 (ICE: in remap_type_1, at tree-inline.c:540) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=679337288c80140fefbe682cb85cbff7bc271bc0;p=gcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 889f3c1a4d5..146d2ff5e43 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2015-01-15 Jan Hubicka + + PR tree-optimization/62053 + * tree.c (build_cplus_array_type): Layout type after variants are set. + 2015-01-15 Jakub Jelinek * cp-gimplify.c (cp_genericize_r): Call diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 80f2ce6ab9f..afb57a3a12a 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); } }