Message ID | eaa197a2-a65f-f796-0817-5e7bf76efad4@netcologne.de |
---|---|
State | New |
Headers | show |
Series | [fortran,committed] Fix PR 84134 | expand |
Index: array.c =================================================================== --- array.c (Revision 257131) +++ array.c (Arbeitskopie) @@ -2245,9 +2245,12 @@ gfc_ref_dimen_size (gfc_array_ref *ar, int dimen, else { stride_expr = gfc_copy_expr(ar->stride[dimen]); + if(!gfc_simplify_expr(stride_expr, 1)) gfc_internal_error("Simplification error"); - if (stride_expr->expr_type != EXPR_CONSTANT) + + if (stride_expr->expr_type != EXPR_CONSTANT + || mpz_cmp_ui (stride_expr->value.integer, 0) == 0) { mpz_clear (stride); return false;