aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 75a6ca3..e31ecbd 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -2191,7 +2191,14 @@ resolve_operator (gfc_expr * e)
/* Attempt to simplify the expression. */
if (t == SUCCESS)
- t = gfc_simplify_expr (e, 0);
+ {
+ t = gfc_simplify_expr (e, 0);
+ /* Some calls do not succeed in simplification and return FAILURE
+ even though there is no error; eg. variable references to
+ PARAMETER arrays. */
+ if (!gfc_is_constant_expr (e))
+ t = SUCCESS;
+ }
return t;
bad_op: