[Patch, fortran] PR29507 - ICE with array actual for the INDEX intrinsic.

THOMAS Paul Richard 169137 Paul.Richard.THOMAS@cea.fr
Fri Oct 20 08:10:00 GMT 2006


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.
>  
> 
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: application/octet-stream
Size: 2282 bytes
Desc: submit.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061020/62b2a93e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Change.logs
Type: application/octet-stream
Size: 323 bytes
Desc: Change.logs
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061020/62b2a93e/attachment-0001.obj>


More information about the Fortran mailing list