]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
trans-array.c (gfc_trans_preloop_setup): Remove redundant assertion.
authorMikael Morin <mikael@gcc.gnu.org>
Thu, 3 Nov 2011 20:52:14 +0000 (20:52 +0000)
committerMikael Morin <mikael@gcc.gnu.org>
Thu, 3 Nov 2011 20:52:14 +0000 (20:52 +0000)
* trans-array.c (gfc_trans_preloop_setup): Remove redundant assertion.
Special case outermost loop.

From-SVN: r180846

gcc/fortran/ChangeLog
gcc/fortran/trans-array.c

index 925183392ffd92393c7e06d1638c3a085cee62c7..7c36e109903fbe72b8c59d994a5a609e83b46f59 100644 (file)
@@ -1,3 +1,8 @@
+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
index e3134f5efa9e485d0f99cc2205a105a5d2a9aa53..f5e30ae4e7c47ca2821d92eec376f2aa8776abf8 100644 (file)
@@ -2867,7 +2867,10 @@ gfc_trans_preloop_setup (gfc_loopinfo * loop, int dim, int flag,
       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]);
@@ -2875,10 +2878,6 @@ gfc_trans_preloop_setup (gfc_loopinfo * loop, int dim, int flag,
 
       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