[Patch, fortran] [2/5] PR 45648: Inline transpose part 2: Take transposed dimensions into account whilst checking for full array
Mikael Morin
mikael.morin@sfr.fr
Mon Sep 20 22:21:00 GMT 2010
We have to take into account the fact that we can access an array transposed when checking whether an array reference is a reference to a full array.
OK for trunk ?
-------------- next part --------------
2010-09-20 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/45648
* trans-array.c (gfc_conv_expr_descriptor): Unset full if we are
accessing dimensions in reversed order.
-------------- next part --------------
diff --git a/trans-array.c b/trans-array.c
index f15b53e..52e6d2a 100644
--- a/trans-array.c
+++ b/trans-array.c
@@ -5216,6 +5216,14 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
full = gfc_full_array_ref_p (info->ref, NULL);
if (full)
+ for (n = 0; n < info->dimen; n++)
+ if (info->dim[n] != n)
+ {
+ full = 0;
+ break;
+ }
+
+ if (full)
{
if (se->direct_byref && !se->byref_noassign)
{
More information about the Fortran
mailing list