:ADDPATCH fortran:
This PR is due to an ICE which occurs because the simplification
of the INDEX intrinsic has no means to handle array constructor
arguments. The fix is a straightforward bit of gfc_expr'ionary
and hints at a more general solution in gfc_simplify_expr for all
intrinsic calls that expect a scalar argument but receive an array.
I propose to keep this PR open, even if this patch is accepted, to
function as a TODO for the more general approach. The testcase is
Steve's original.
Regested on PIV/Cygwin_NT - OK for trunk?
Paul
2006-10-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29507
* simplify.c (gfc_simplify_index): If the first argument is
an array, build an array constructor result and call this
function for each of the elements.
2006-10-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29507
* gfortran.dg/index_1.f90: New test.