This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/64980] [5 Regression] ICE in trans-expr.c
- From: "bernd.edlinger at hotmail dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 16 Feb 2015 19:44:53 +0000
- Subject: [Bug fortran/64980] [5 Regression] ICE in trans-expr.c
- Auto-submitted: auto-generated
- References: <bug-64980-4 at http dot gcc dot gnu dot org/bugzilla/>
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.