re PR tree-optimization/62053 (ICE: in remap_type_1, at tree-inline.c:540)
authorJan Hubicka <hubicka@ucw.cz>
Fri, 16 Jan 2015 04:45:53 +0000 (05:45 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 16 Jan 2015 04:45:53 +0000 (04:45 +0000)
PR tree-optimization/62053
* tree.c (build_cplus_array_type): Layout type after variants are set.

From-SVN: r219705

gcc/cp/ChangeLog
gcc/cp/tree.c

index 889f3c1..146d2ff 100644 (file)
@@ -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
index 80f2ce6..afb57a3 100644 (file)
@@ -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);
        }
     }