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.