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 c++/62127] [5 Regression] ICE with VLA in constructor


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62127

--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Uff, this is caused by a pasto where I forget to remap TREE_TYPE of array.

Index: tree-inline.c
===================================================================
--- tree-inline.c       (revision 216141)
+++ tree-inline.c       (working copy)
@@ -496,6 +496,8 @@ remap_type_1 (tree type, copy_body_data
       if (TYPE_MAIN_VARIANT (new_tree) != new_tree
          && TREE_TYPE (type) == TREE_TYPE (TYPE_MAIN_VARIANT (type)))
        TREE_TYPE (new_tree) = TREE_TYPE (TYPE_MAIN_VARIANT (new_tree));
+      else
+       TREE_TYPE (new_tree) = remap_type (TREE_TYPE (new_tree), id);

       if (TYPE_MAIN_VARIANT (new_tree) != new_tree)
        {


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