summaryrefslogtreecommitdiffstats
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-04 19:30:33 +0000
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-04 19:30:33 +0000
commit9fb2e10d0cf939b41bdc097c4b2cc0aff553a92e (patch)
treea5de30dba6b48e31f649f381012a7df875e6dab3 /gcc/fortran/resolve.c
parent7d1f52b23a4d503ddbb1bb6bd82a2e4a992ad6de (diff)
downloadppe42-gcc-9fb2e10d0cf939b41bdc097c4b2cc0aff553a92e.tar.gz
ppe42-gcc-9fb2e10d0cf939b41bdc097c4b2cc0aff553a92e.zip
2006-12-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29821 * resolve.c (resolve_operator): Only return result of gfc_simplify_expr if expression is constant. 2006-12-04 Paul Thomas <pault@gcc.gnu.org> PR fortran/29821 * gfortran.dg/parameter_array_section_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119504 138bc75d-0d04-0410-961f-82ee72b054a4
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 75a6ca31b8f..e31ecbd5909 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:
OpenPOWER on IntegriCloud