Message ID | 20100920222130.27269.44792@gimli.local |
---|---|
State | New |
Headers | show |
Mikael, This is OK. What would be the consequence of putting the additional code in gfc_full_array_ref_p? Cheers Paul On 9/21/10, Mikael Morin <mikael.morin@sfr.fr> wrote: > 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 ? > > >
On Tuesday 21 September 2010 15:50:55 Paul Richard Thomas wrote: > Mikael, > > This is OK. > > What would be the consequence of putting the additional code in > gfc_full_array_ref_p? Hello, this is not possible (at least with the current code) as info->ref doesn't have the order in which dimensions are accessed (which is in info->dim). Besides, there is a distinction between the array itself which is full and transpose(array) which is not. Thus, I think it is better to keep the code separated. Thanks for the review. Mikael
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) {