[patch, fortran] PR30371: KILL subroutine accepts array arguments.

Brooks Moses brooks.moses@codesourcery.com
Fri Jan 5 01:40:00 GMT 2007


Steve Kargl wrote:
> On Thu, Jan 04, 2007 at 05:12:27PM -0800, Brooks Moses wrote:
>> The KILL() subroutine accepts arrays for the first two arguments, but 
>> then appears (to me) to erroneously treat them as scalars.  I presume 
>> that this is in error and have filed PR30371; the attached patch adds 
>> appropriate checks to gfc_check_kill_sub() to confirm that all of the 
>> arguments are scalar.
>>
>> -----------------------------------------------------------------
>> 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
>>
>> 	* check.c (gfc_check_kill_sub): Add checks for non-scalar
>> 	arguments.
>>
> 
> OK.
> 
> Do we also need to the scalar checks in gfc_check_kill?
> A quick glance at the code suggests that we do.

I'm not sure.  The KILL() function is flagged as ELEMENTAL in 
intrinsic.c, and I'm not familiar enough with how elemental functions 
are handled to know if that will do the right thing or not.

- Brooks



More information about the Gcc-patches mailing list