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 889f3c1a4d5bda515d342346ae632d8d1edcc46d..146d2ff5e4368dcf0cf764710a1b836633bed117 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 80f2ce6ab9fcb41e0b0827c6a49005325d9b5eb1..afb57a3a12a8332144f6c1555411412c09159e4f 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);
        }
     }