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 fortran/45586] [4.6/4.7 Regression] ICE non-trivial conversion at assignment


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45586

--- Comment #64 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-14 13:20:37 UTC ---
Index: gcc/fortran/trans-types.c
===================================================================
--- gcc/fortran/trans-types.c   (revision 184203)
+++ gcc/fortran/trans-types.c   (working copy)
@@ -2042,7 +2042,8 @@ gfc_nonrestricted_type (tree t)
              }
          if (!field)
            break;
-         ret = build_variant_type_copy (t);
+         ret = build_distinct_type_copy (t);
+         TYPE_CANONICAL (ret) = TYPE_CANONICAL (t);
          TYPE_FIELDS (ret) = NULL_TREE;

          /* Here we make sure that as soon as we know we have to copy

works here, but I suspect it would not fix the Fortran -flto ICEs in
PR51765 (which happen on pristine trunk, much to the same issue I suppose).


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