diff options
author | Mikael Morin <mikael@gcc.gnu.org> | 2010-09-09 14:12:08 +0000 |
---|---|---|
committer | Mikael Morin <mikael@gcc.gnu.org> | 2010-09-09 14:12:08 +0000 |
commit | e3cdb7cf9a0d934b9cdc24d40d730141e5752f60 (patch) | |
tree | 0bbe094205cd2b6fc602803f342ae57b95b84890 /gcc/fortran/trans-array.c | |
parent | 5582cb29ba08c42f8f02bc203a0c427cfa728c73 (diff) | |
download | gcc-e3cdb7cf9a0d934b9cdc24d40d730141e5752f60.zip gcc-e3cdb7cf9a0d934b9cdc24d40d730141e5752f60.tar.gz gcc-e3cdb7cf9a0d934b9cdc24d40d730141e5752f60.tar.bz2 |
trans-array.c (gfc_set_loop_bounds_from_array_spec): Get the array dimension from the dim array.
2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
* trans-array.c (gfc_set_loop_bounds_from_array_spec):
Get the array dimension from the dim array.
From-SVN: r164109
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index e0bc34f..a5da474 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -562,9 +562,11 @@ gfc_set_loop_bounds_from_array_spec (gfc_interface_mapping * mapping, tree tmp; if (as && as->type == AS_EXPLICIT) - for (dim = 0; dim < se->loop->dimen; dim++) + for (n = 0; n < se->loop->dimen; n++) { - n = se->loop->order[dim]; + dim = se->ss->data.info.dim[n]; + gcc_assert (dim < as->rank); + gcc_assert (se->loop->dimen == as->rank); if (se->loop->to[n] == NULL_TREE) { /* Evaluate the lower bound. */ |