This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/45586] [4.6/4.7 Regression] ICE non-trivial conversion at assignment
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 14 Feb 2012 13:20:37 +0000
- Subject: [Bug fortran/45586] [4.6/4.7 Regression] ICE non-trivial conversion at assignment
- Auto-submitted: auto-generated
- References: <bug-45586-4@http.gcc.gnu.org/bugzilla/>
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).