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/64980] [5 Regression] ICE in trans-expr.c


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

--- Comment #20 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to Dominique d'Humieres from comment #12)
> In addition Bernd's patch fixes/hides the ICE for pr61960.

this pr is fixed by this hunk alone:
--- gcc/fortran/trans-expr.c    (revision 220662)
+++ gcc/fortran/trans-expr.c    (working copy)
@@ -3783,10 +3783,6 @@ gfc_apply_interface_mapping_to_expr (gfc_interface
          expr->symtree = sym->new_sym;
        else if (sym->expr)
          gfc_replace_expr (expr, gfc_copy_expr (sym->expr));
-       /* Replace base type for polymorphic arguments.  */
-       if (expr->ref && expr->ref->type == REF_COMPONENT
-           && sym->expr && sym->expr->ts.type == BT_CLASS)
-         expr->ref->u.c.sym = sym->expr->ts.u.derived;
       }

       /* ...and to subexpressions in expr->value.  */

I verified the generated code, not only the ICE is gone, but
the code seems work.

So I'd declare pr61960 to be a duplicate of this PR.


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