https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124652
--- Comment #8 from anlauf at gcc dot gnu.org ---
(In reply to anlauf from comment #7)
> Is the CLOBBER correct?
Disabling it with the following patch fixes the ICE:
diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc
index d5254be007d..6d411040042 100644
--- a/gcc/fortran/trans-expr.cc
+++ b/gcc/fortran/trans-expr.cc
@@ -7549,6 +7549,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
&& !e->ts.u.derived->attr.alloc_comp
&& !e->ts.u.derived->attr.pdt_type
&& !gfc_is_finalizable (e->ts.u.derived,
NULL)))
+ && e->ts.type != BT_PROCEDURE
&& !sym->attr.elemental)
{
tree var;