2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
+ * trans-array.c (dim_ok, transposed_dims): Rename the former to the
+ latter. Change argument type. Invert return value.
+ (gfc_conv_expr_descriptor): Update calls.
+
+2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
+
* trans-array.c (get_array_ref_dim): Change argument type and name.
Obtain previous argument from the new argument in the body.
(gfc_trans_create_temp_arry, gfc_conv_loop_setup): Update calls.
/* Helper function to check dimensions. */
static bool
-dim_ok (gfc_ss_info *info)
+transposed_dims (gfc_ss *ss)
{
+ gfc_ss_info *info;
int n;
+
+ info = &ss->data.info;
for (n = 0; n < info->dimen; n++)
if (info->dim[n] != n)
- return false;
- return true;
+ return true;
+ return false;
}
/* Convert an array for passing as an actual argument. Expressions and
else
full = gfc_full_array_ref_p (info->ref, NULL);
- if (full && dim_ok (info))
+ if (full && !transposed_dims (ss))
{
if (se->direct_byref && !se->byref_noassign)
{
desc = loop.temp_ss->data.info.descriptor;
}
- else if (expr->expr_type == EXPR_FUNCTION && dim_ok (info))
+ else if (expr->expr_type == EXPR_FUNCTION && !transposed_dims (ss))
{
desc = info->descriptor;
se->string_length = ss->string_length;