]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
authormikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Sep 2010 13:54:34 +0000 (13:54 +0000)
committermikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Sep 2010 13:54:34 +0000 (13:54 +0000)
* trans-array.c (gfc_trans_preloop_setup): Unconditionally use the
dim array to get the stride in the innermost loop.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164103 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 07228f6664bebaca003543ba5c5a319467944db8..2483ad9bea722bdbd0c544b1ebbd3d028f738153 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2010-09-09  Mikael Morin  <mikael@gcc.gnu.org>
 
        * trans-array.c (gfc_trans_create_temp_array): Don't set dim array.
index c9e72f67cf937b861c0f9c80764dedf76f00c706..e0bc34fe3b0290291b804d07544c0ae7bf99a70b 100644 (file)
@@ -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