This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/45586] [4.6 Regression] ICE non-trivial conversion at assignment
- From: "matz at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 25 Jan 2011 15:03:06 +0000
- Subject: [Bug fortran/45586] [4.6 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 #40 from Michael Matz <matz at gcc dot gnu.org> 2011-01-25 15:02:40 UTC ---
The patch from comment #35 requires another change in unrelated code, which
I think actually fixes a pre-existing bug in type extension support:
Index: fortran/trans-expr.c
===================================================================
--- fortran/trans-expr.c (revision 168749)
+++ fortran/trans-expr.c (working copy)
@@ -549,11 +562,11 @@ conv_parent_component_references (gfc_se
if (dt->attr.extension && dt->components)
{
- if (dt->attr.is_class)
+ if (1 || dt->attr.is_class)
cmp = dt->components;
else
cmp = dt->components->next;
- /* Return if the component is not in the parent type. */
+ /* Return if the component is in this type. */
for (; cmp; cmp = cmp->next)
if (strcmp (c->name, cmp->name) == 0)
return;
Otherwise the new assert will trigger on extends_*.f03 because the frontend
is trying to generate obviously wrong component_refs.