aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index 92454f6..8230b46 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -1895,7 +1895,7 @@ gfc_simplify_expr (gfc_expr *p, int type)
/* Only substitute array parameter variables if we are in an
initialization expression, or we want a subsection. */
if (p->symtree->n.sym->attr.flavor == FL_PARAMETER
- && (gfc_init_expr || p->ref
+ && (gfc_init_expr_flag || p->ref
|| p->symtree->n.sym->value->expr_type != EXPR_ARRAY))
{
if (simplify_parameter_variable (p, type) == FAILURE)
@@ -2626,11 +2626,11 @@ gfc_reduce_init_expr (gfc_expr *expr)
{
gfc_try t;
- gfc_init_expr = 1;
+ gfc_init_expr_flag = true;
t = gfc_resolve_expr (expr);
if (t == SUCCESS)
t = check_init_expr (expr);
- gfc_init_expr = 0;
+ gfc_init_expr_flag = false;
if (t == FAILURE)
return FAILURE;
@@ -2648,11 +2648,7 @@ gfc_reduce_init_expr (gfc_expr *expr)
/* Match an initialization expression. We work by first matching an
- expression, then reducing it to a constant. The reducing it to
- constant part requires a global variable to flag the prohibition
- of a non-integer exponent in -std=f95 mode. */
-
-bool init_flag = false;
+ expression, then reducing it to a constant. */
match
gfc_match_init_expr (gfc_expr **result)
@@ -2663,12 +2659,12 @@ gfc_match_init_expr (gfc_expr **result)
expr = NULL;
- init_flag = true;
+ gfc_init_expr_flag = true;
m = gfc_match_expr (&expr);
if (m != MATCH_YES)
{
- init_flag = false;
+ gfc_init_expr_flag = false;
return m;
}
@@ -2676,12 +2672,12 @@ gfc_match_init_expr (gfc_expr **result)
if (t != SUCCESS)
{
gfc_free_expr (expr);
- init_flag = false;
+ gfc_init_expr_flag = false;
return MATCH_ERROR;
}
*result = expr;
- init_flag = false;
+ gfc_init_expr_flag = false;
return MATCH_YES;
}