https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125998
--- Comment #8 from Harald Anlauf <anlauf at gcc dot gnu.org> ---
(In reply to Harald Anlauf from comment #7)
> This seems to be your code, Mikael.
> We could try to suppress this exception.
Like:
diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc
index 9108e92b446..a18701763e2 100644
--- a/gcc/fortran/trans-expr.cc
+++ b/gcc/fortran/trans-expr.cc
@@ -8045,6 +8047,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
? gfc_is_not_contiguous (e)
: !gfc_is_simply_contiguous (e, false, true))
&& gfc_expr_is_variable (e)
+ && gfc_get_noncopying_intrinsic_argument (e) == NULL
&& e->rank != -1)
{
gfc_conv_subref_array_arg (&parmse, e, nodesc_arg,