diff options
author | Mikael Morin <mikael@gcc.gnu.org> | 2012-09-07 20:37:41 +0000 |
---|---|---|
committer | Mikael Morin <mikael@gcc.gnu.org> | 2012-09-07 20:37:41 +0000 |
commit | 0423b64acd65bf78901d54c2a2d5af71cd347e00 (patch) | |
tree | 6215a61a9e3f6e1cc54f488c9e8ea2d2443d31c8 /gcc/fortran | |
parent | e4394af56897939d2f47827330f75838fe038b23 (diff) | |
download | gcc-0423b64acd65bf78901d54c2a2d5af71cd347e00.zip gcc-0423b64acd65bf78901d54c2a2d5af71cd347e00.tar.gz gcc-0423b64acd65bf78901d54c2a2d5af71cd347e00.tar.bz2 |
re PR fortran/54208 (compilation error for ubound construct in PARAMETER statements)
fortran/
PR fortran/54208
* simplify.c (simplify_bound_dim): Resolve array spec before
proceeding with simplification.
testsuite/
PR fortran/54208
* gfortran.dg/bound_simplification_3.f90: New test.
From-SVN: r191083
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/simplify.c | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index d237a24..f0e6cad 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2012-09-07 Mikael Morin <mikael@gcc.gnu.org> + + PR fortran/54208 + * simplify.c (simplify_bound_dim): Resolve array spec before + proceeding with simplification. + 2012-09-06 Tobias Burnus <burnus@net-b.de> PR fortran/54463 diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index e4ccddf..07aeee8 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -3255,6 +3255,9 @@ simplify_bound_dim (gfc_expr *array, gfc_expr *kind, int d, int upper, gcc_assert (array->expr_type == EXPR_VARIABLE); gcc_assert (as); + if (gfc_resolve_array_spec (as, 0) == FAILURE) + return NULL; + /* The last dimension of an assumed-size array is special. */ if ((!coarray && d == as->rank && as->type == AS_ASSUMED_SIZE && !upper) || (coarray && d == as->rank + as->corank |