+2008-04-15 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/35864
+ * expr.c (scalarize_intrinsic_call): Reorder identification of
+ array argument so that if one is not found a segfault does not
+ occur. Return FAILURE if all scalar arguments.
+
2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
gfc_expr *expr, *old;
int n, i, rank[5], array_arg;
- old = gfc_copy_expr (e);
-
-
/* Find which, if any, arguments are arrays. Assume that the old
expression carries the type information and that the first arg
that is an array expression carries all the shape information.*/
n = array_arg = 0;
- a = old->value.function.actual;
+ a = e->value.function.actual;
for (; a; a = a->next)
{
n++;
}
if (!array_arg)
- goto cleanup;
+ return FAILURE;
+
+ old = gfc_copy_expr (e);
gfc_free_constructor (expr->value.constructor);
expr->value.constructor = NULL;
}
- /* Using the first argument as the master, step through the array
+ /* Using the array argument as the master, step through the array
calling the function for each element and advancing the array
constructors together. */
ctor = args[array_arg - 1];