diff options
Diffstat (limited to 'gcc/fortran/simplify.c')
-rw-r--r-- | gcc/fortran/simplify.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index f631ac8..4ef9025 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -3338,7 +3338,7 @@ simplify_bound_dim (gfc_expr *array, gfc_expr *kind, int d, int upper, result = gfc_get_constant_expr (BT_INTEGER, k, &array->where); /* Then, we need to know the extent of the given dimension. */ - if (coarray || ref->u.ar.type == AR_FULL) + if (coarray || (ref->u.ar.type == AR_FULL && !ref->next)) { l = as->lower[d-1]; u = as->upper[d-1]; @@ -3417,10 +3417,7 @@ simplify_bound (gfc_expr *array, gfc_expr *dim, gfc_expr *kind, int upper) case AR_FULL: /* We're done because 'as' has already been set in the previous iteration. */ - if (!ref->next) - goto done; - - /* Fall through. */ + goto done; case AR_UNKNOWN: return NULL; @@ -3589,10 +3586,7 @@ simplify_cobound (gfc_expr *array, gfc_expr *dim, gfc_expr *kind, int upper) case AR_FULL: /* We're done because 'as' has already been set in the previous iteration. */ - if (!ref->next) - goto done; - - /* Fall through. */ + goto done; case AR_UNKNOWN: return NULL; |