https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120958
--- Comment #1 from Martin Jambor <jamborm at gcc dot gnu.org> ---
And indeed the following hack in Fortran FE "fixes" the benchmark (of
course, this is not meant as a proposed fix, just as a demonstration
where the problem is):
diff --git a/gcc/fortran/trans-types.cc b/gcc/fortran/trans-types.cc
index 1754d982153..7ee65a983a7 100644
--- a/gcc/fortran/trans-types.cc
+++ b/gcc/fortran/trans-types.cc
@@ -3327,6 +3327,7 @@ create_fn_spec (gfc_symbol *sym, tree fntype)
}
}
+ bool is_mpi_irecv = (strcmp (sym->name, "mpi_irecv") == 0);
for (f = gfc_sym_get_dummy_args (sym); f; f = f->next)
if (spec_len < sizeof (spec))
{
@@ -3342,6 +3343,7 @@ create_fn_spec (gfc_symbol *sym, tree fntype)
}
if (f->sym == NULL || is_pointer || f->sym->attr.target
+ || is_mpi_irecv
|| f->sym->attr.external || f->sym->attr.cray_pointer
|| (f->sym->ts.type == BT_DERIVED
&& (f->sym->ts.u.derived->attr.proc_pointer_comp