This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/62053] [5 Regression] ICE: in remap_type_1, at tree-inline.c:540


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]