Special case outermost loop.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180846
138bc75d-0d04-0410-961f-
82ee72b054a4
2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
+ * trans-array.c (gfc_trans_preloop_setup): Remove redundant assertion.
+ Special case outermost loop.
+
+2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
+
* trans-array.c (gfc_trans_preloop_setup): Factor loop index
initialization.
else
ar = NULL;
- i = dim + 1;
+ if (dim == info->dimen - 1)
+ i = 0;
+ else
+ i = dim + 1;
/* For the time being, there is no loop reordering. */
gcc_assert (i == loop->order[i]);
if (dim == info->dimen - 1)
{
- 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