diff options
author | Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> | 2004-07-15 21:55:05 +0200 |
---|---|---|
committer | Tobias Schlüter <tobi@gcc.gnu.org> | 2004-07-15 21:55:05 +0200 |
commit | 0c0df4b3f017b53fb9a0760ce8c68c293a573a76 (patch) | |
tree | 3b66f741646de966e13644d5b4bea988310353c1 /gcc/fortran | |
parent | 4c467d411382344a2a754f4d247f9b3226b3486f (diff) | |
download | gcc-0c0df4b3f017b53fb9a0760ce8c68c293a573a76.zip gcc-0c0df4b3f017b53fb9a0760ce8c68c293a573a76.tar.gz gcc-0c0df4b3f017b53fb9a0760ce8c68c293a573a76.tar.bz2 |
re PR fortran/13792 (lbound/ubound generates internal compiler error)
fortran/
PR fortran/13792
* simplify.c (gfc_simplify_bound): Copy the bound expression.
testsuite/
PR fortran/13792
* gfortran.fortran-torture/execute/bounds.f90: Add check for
compile-time simplification.
From-SVN: r84773
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/simplify.c | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index e69b5de..fd67582 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -6,7 +6,10 @@ PR fortran/15140 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion. - + + PR fortran/13792 + * simplify.c (gfc_simplify_bound): Copy the bound expression. + 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> PR fortran/15324 diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index a90d05d..d67b5c6 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -1892,9 +1892,9 @@ gfc_simplify_bound (gfc_expr * array, gfc_expr * dim, int upper) i = mpz_get_si (dim->value.integer); if (upper) - return as->upper[i-1]; + return gfc_copy_expr (as->upper[i-1]); else - return as->lower[i-1]; + return gfc_copy_expr (as->lower[i-1]); } |