]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/fortran/match.c
Fortran] PR 92996 – fix rank resolution EXPR_ARRAY
[thirdparty/gcc.git] / gcc / fortran / match.c
index b5945049de550ba61af48842a248a31ab7555964..d3e3abcb700f3fe374b1b18a7945739f60531fce 100644 (file)
@@ -3073,7 +3073,8 @@ gfc_match_stopcode (gfc_statement st)
 
   if (e != NULL)
     {
-      gfc_simplify_expr (e, 0);
+      if (!gfc_simplify_expr (e, 0))
+       goto cleanup;
 
       /* Test for F95 and F2003 style STOP stop-code.  */
       if (e->expr_type != EXPR_CONSTANT && (f95 || f03))
@@ -3085,9 +3086,7 @@ gfc_match_stopcode (gfc_statement st)
 
       /* Use the machinery for an initialization expression to reduce the
         stop-code to a constant.  */
-      gfc_init_expr_flag = true;
       gfc_reduce_init_expr (e);
-      gfc_init_expr_flag = false;
 
       /* Test for F2008 style STOP stop-code.  */
       if (e->expr_type != EXPR_CONSTANT && f08)