From 5551a54eda2d74c6d3ecd23e81b387d935c4603b Mon Sep 17 00:00:00 2001 From: Mikael Morin Date: Fri, 7 Oct 2011 21:56:11 +0200 Subject: resolve.c (resolve_array_ref): Set array_ref's dimen field (and the associated dimen_type) in the full array... * resolve.c (resolve_array_ref): Set array_ref's dimen field (and the associated dimen_type) in the full array ref case. From-SVN: r179685 --- gcc/fortran/resolve.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'gcc/fortran/resolve.c') diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index e6770db..edeb49d 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -4644,8 +4644,23 @@ resolve_array_ref (gfc_array_ref *ar) } } - if (ar->type == AR_FULL && ar->as->rank == 0) - ar->type = AR_ELEMENT; + if (ar->type == AR_FULL) + { + if (ar->as->rank == 0) + ar->type = AR_ELEMENT; + + /* Make sure array is the same as array(:,:), this way + we don't need to special case all the time. */ + ar->dimen = ar->as->rank; + for (i = 0; i < ar->dimen; i++) + { + ar->dimen_type[i] = DIMEN_RANGE; + + gcc_assert (ar->start[i] == NULL); + gcc_assert (ar->end[i] == NULL); + gcc_assert (ar->stride[i] == NULL); + } + } /* If the reference type is unknown, figure out what kind it is. */ -- cgit v1.1