diff options
author | Mikael Morin <mikael.morin@sfr.fr> | 2011-10-07 21:56:11 +0200 |
---|---|---|
committer | Mikael Morin <mikael@gcc.gnu.org> | 2011-10-07 19:56:11 +0000 |
commit | 5551a54eda2d74c6d3ecd23e81b387d935c4603b (patch) | |
tree | 3648cdc7ce747408f969d0b06357136534b7e03e /gcc/fortran/resolve.c | |
parent | 9b701a45c047674f32a5bbd2dc4a42ad7fd95c80 (diff) | |
download | gcc-5551a54eda2d74c6d3ecd23e81b387d935c4603b.zip gcc-5551a54eda2d74c6d3ecd23e81b387d935c4603b.tar.gz gcc-5551a54eda2d74c6d3ecd23e81b387d935c4603b.tar.bz2 |
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
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 19 |
1 files changed, 17 insertions, 2 deletions
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. */ |