diff mbox

[fortran,0/11] Inline transpose part 1

Message ID 4C82581B.8000108@sfr.fr
State New
Headers show

Commit Message

Mikael Morin Sept. 4, 2010, 2:30 p.m. UTC
Take transpose into account while getting array bounds from shape.
OK for trunk?
2010-09-03  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.
diff mbox

Patch

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);