aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2006-12-04 19:30:33 +0000
committerPaul Thomas <pault@gcc.gnu.org>2006-12-04 19:30:33 +0000
commitdd5ecf415546bfcd359c5f6dc7500fe7cc319593 (patch)
treea5de30dba6b48e31f649f381012a7df875e6dab3 /gcc/fortran
parentc58936b6b75bfea1b486a7040081e423e58a56de (diff)
downloadgcc-dd5ecf415546bfcd359c5f6dc7500fe7cc319593.zip
gcc-dd5ecf415546bfcd359c5f6dc7500fe7cc319593.tar.gz
gcc-dd5ecf415546bfcd359c5f6dc7500fe7cc319593.tar.bz2
[multiple changes]
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. From-SVN: r119504
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/resolve.c9
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 5dad677..2ce1ec6 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,11 @@
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/29916
* resolve.c (resolve_symbol): Allow host-associated variables
the specification expression of an array-valued function.
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: