From patchwork Sat Sep 4 14:30:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [fortran,0/11] Inline transpose part 1 From: Mikael Morin X-Patchwork-Id: 63789 Message-Id: <4C82581B.8000108@sfr.fr> To: "fortran@gcc.gnu.org" , gcc-patches Date: Sat, 04 Sep 2010 16:30:51 +0200 Take transpose into account while getting array bounds from shape. OK for trunk? 2010-09-03 Mikael Morin * trans-array.c (gfc_conv_loop_setup): Access the shape along the real array dimension instead of the scalarizer (loop) dimension. diff --git a/trans-array.c b/trans-array.c index 371654c..cd18905 100644 --- a/trans-array.c +++ b/trans-array.c @@ -3740,7 +3740,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);