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.

Reply via email to