diff options
author | mikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-18 15:11:21 +0000 |
---|---|---|
committer | mikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-18 15:11:21 +0000 |
commit | ce79f3ecdca2e93ea18ef4b30484d5e1602f3d2a (patch) | |
tree | e1277d5dbaeca917c39cead682ede81ef8a4b104 /gcc/fortran/simplify.c | |
parent | 938765a1fc24ca864cbb9d0e501f8fc31bb40032 (diff) | |
download | gcc-ce79f3ecdca2e93ea18ef4b30484d5e1602f3d2a.tar.gz |
PR fortran/50420
* simplify.c (simplify_cobound): Accept non-last-in-ref-chain coarrays.
Don't set already set array ref.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180150 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/simplify.c')
-rw-r--r-- | gcc/fortran/simplify.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index 13a9c5147c0..63689bb700c 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -3512,11 +3512,9 @@ simplify_cobound (gfc_expr *array, gfc_expr *dim, gfc_expr *kind, int upper) switch (ref->u.ar.type) { case AR_ELEMENT: - if (ref->next == NULL) + if (ref->u.ar.as->corank > 0) { - gcc_assert (ref->u.ar.as->corank > 0 - && ref->u.ar.as->rank == 0); - as = ref->u.ar.as; + gcc_assert (as == ref->u.ar.as); goto done; } as = NULL; |