https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56789
--- Comment #14 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- This would reject the obvious non-contiguous cases. Index: interface.c =================================================================== --- interface.c (Revision 264540) +++ interface.c (Arbeitskopie) @@ -3297,6 +3297,14 @@ compare_actual_formal (gfc_actual_arglist **ap, gf return false; } + if (f->sym->attr.contiguous + && !gfc_is_simply_contiguous (a->expr, false, true)) + { + gfc_error ("Non-contiguous argument actual argument passed to " + "contiguous dummy argument %qs at %L", f->sym->name, + &a->expr->where); + } + /* Find the last array_ref. */ actual_arr_ref = NULL; if (a->expr->ref) Index: trans-array.c =================================================================== --- trans-array.c (Revision 264540) +++ trans-array.c (Arbeitskopie) @@ -7862,8 +7862,7 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * gfc_prepend_expr_to_block (&se->post, tmp); } - if (g77 || (fsym && fsym->attr.contiguous - && !gfc_is_simply_contiguous (expr, false, true))) + if (g77) { tree origptr = NULL_TREE;