]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
trans-array.c (gfc_conv_loop_setup): Access the shape along the real array dimension...
authorMikael Morin <mikael@gcc.gnu.org>
Fri, 10 Sep 2010 10:42:56 +0000 (10:42 +0000)
committerMikael Morin <mikael@gcc.gnu.org>
Fri, 10 Sep 2010 10:42:56 +0000 (10:42 +0000)
2010-09-10  Mikael Morin  <mikael@gcc.gnu.org>

* trans-array.c (gfc_conv_loop_setup): Access the shape along the
real array dimension instead of the scalarizer (loop) dimension.

From-SVN: r164162

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

index daf4cd6dbe64666a7ac160a20c58ba9f4f10ebc1..8c70828443e49b7cb36b986be48caa1cb337f1bf 100644 (file)
@@ -1,3 +1,8 @@
+2010-09-10  Mikael Morin  <mikael@gcc.gnu.org>
+
+       * trans-array.c (gfc_conv_loop_setup): Access the shape along the
+       real array dimension instead of the scalarizer (loop) dimension.
+
 2010-09-10  Mikael Morin  <mikael@gcc.gnu.org>
 
        * trans-array.c (gfc_conv_resolve_dependencies): Handle same-array
index cd5f4384042d7b15aec049fac0934e7cf84a9e3c..7483ca826665f66c402c8b55b8982af792680918 100644 (file)
@@ -3801,7 +3801,7 @@ gfc_conv_loop_setup (gfc_loopinfo * loop, locus * where)
          && INTEGER_CST_P (info->stride[dim]))
        {
          loop->from[n] = info->start[dim];
-         mpz_set (i, cshape[n]);
+         mpz_set (i, cshape[get_array_ref_dim (info, n)]);
          mpz_sub_ui (i, i, 1);
          /* To = from + (size - 1) * stride.  */
          tmp = gfc_conv_mpz_to_tree (i, gfc_index_integer_kind);