aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-array.c
diff options
context:
space:
mode:
authorMikael Morin <mikael@gcc.gnu.org>2010-09-09 13:54:34 +0000
committerMikael Morin <mikael@gcc.gnu.org>2010-09-09 13:54:34 +0000
commit79c3dc5f228cee5f58747deb1efa0b36b99bc41d (patch)
tree6bac629827d8bd992b426f10e79ef0f912d1c15f /gcc/fortran/trans-array.c
parentde8e52f063c997bed974210186c9105e9c0a019d (diff)
downloadgcc-79c3dc5f228cee5f58747deb1efa0b36b99bc41d.zip
gcc-79c3dc5f228cee5f58747deb1efa0b36b99bc41d.tar.gz
gcc-79c3dc5f228cee5f58747deb1efa0b36b99bc41d.tar.bz2
trans-array.c (gfc_trans_preloop_setup): Unconditionally use the dim array to get the stride in the innermost loop.
2010-09-09 Mikael Morin <mikael@gcc.gnu.org> * trans-array.c (gfc_trans_preloop_setup): Unconditionally use the dim array to get the stride in the innermost loop. From-SVN: r164103
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r--gcc/fortran/trans-array.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index c9e72f6..e0bc34f 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -2772,16 +2772,17 @@ gfc_trans_preloop_setup (gfc_loopinfo * loop, int dim, int flag,
info->offset, index);
info->offset = gfc_evaluate_now (info->offset, pblock);
}
-
- i = loop->order[0];
- stride = gfc_conv_array_stride (info->descriptor, info->dim[i]);
}
- else
- stride = gfc_conv_array_stride (info->descriptor, 0);
+
+ i = loop->order[0];
+ /* For the time being, the innermost loop is unconditionally on
+ the first dimension of the scalarization loop. */
+ gcc_assert (i == 0);
+ stride = gfc_conv_array_stride (info->descriptor, info->dim[i]);
/* Calculate the stride of the innermost loop. Hopefully this will
- allow the backend optimizers to do their stuff more effectively.
- */
+ allow the backend optimizers to do their stuff more effectively.
+ */
info->stride0 = gfc_evaluate_now (stride, pblock);
}
else