re PR fortran/35864 (Revision 133965 broke gfortran.dg/initialization_1.f90)
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. From-SVN: r134329
This commit is contained in:
parent
69c32ec801
commit
05e6ff8009
2 changed files with 12 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
|||
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>
|
||||
|
||||
|
|
|
@ -1704,14 +1704,11 @@ scalarize_intrinsic_call (gfc_expr *e)
|
|||
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++;
|
||||
|
@ -1723,7 +1720,9 @@ scalarize_intrinsic_call (gfc_expr *e)
|
|||
}
|
||||
|
||||
if (!array_arg)
|
||||
goto cleanup;
|
||||
return FAILURE;
|
||||
|
||||
old = gfc_copy_expr (e);
|
||||
|
||||
gfc_free_constructor (expr->value.constructor);
|
||||
expr->value.constructor = NULL;
|
||||
|
@ -1763,7 +1762,7 @@ scalarize_intrinsic_call (gfc_expr *e)
|
|||
}
|
||||
|
||||
|
||||
/* 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];
|
||||
|
|
Loading…
Add table
Reference in a new issue