https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100551
--- Comment #3 from anlauf at gcc dot gnu.org --- Below fixes this PR and does not break the other testcase: diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index cce18d094a6..ebc9ea42beb 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -5826,7 +5826,8 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, &derived_array); } else if (UNLIMITED_POLY (fsym) && e->ts.type != BT_CLASS - && gfc_expr_attr (e).flavor != FL_PROCEDURE) + && (gfc_expr_attr (e).flavor != FL_PROCEDURE + || gfc_expr_attr (e).proc == PROC_INTRINSIC)) { /* The intrinsic type needs to be converted to a temporary CLASS object for the unlimited polymorphic formal. */ I would hope that Paul can explain why this works, or if this is the right thing.