https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97592
--- Comment #3 from anlauf at gcc dot gnu.org --- It looks like argument association is confused here. (The F2018 reference is 15.5.2.3 and 15.5.2.4). The following patch appears to fix the testcase: diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc index 06713f24f95..c7fb4633ab1 100644 --- a/gcc/fortran/trans-expr.cc +++ b/gcc/fortran/trans-expr.cc @@ -6854,7 +6854,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, INTENT_IN, fsym->attr.pointer); } else if (fsym && fsym->attr.contiguous - && !gfc_is_simply_contiguous (e, false, true) + && gfc_is_not_contiguous (e) && gfc_expr_is_variable (e)) { gfc_conv_subref_array_arg (&parmse, e, nodesc_arg, but unfortunately regresses on gfortran.dg/bind-c-contiguous-3.f90 :-(