[Patch, fortran] PR29507 - ICE with array actual for the INDEX intrinsic.
Paul Thomas
paulthomas2@wanadoo.fr
Sat Oct 21 07:09:00 GMT 2006
I temporarily withdraw this patch - I had not realised how general the
problem is. I started writing a "scalarizer" this lunchtime; I got as
far as it compiling and then segfaulting in execution :-)
Paul
>Here it is - thanks Steve and Tobias for giving me a little nudge.
>
>Paul
>
>
>
>>: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.
>>
>>
>>
>>
>>
>
>
>
More information about the Fortran
mailing list