[patch, fortran] PR30371: KILL subroutine accepts array arguments.
Brooks Moses
brooks.moses@codesourcery.com
Fri Jan 5 06:13:00 GMT 2007
Brooks Moses wrote:
> Steve Kargl wrote:
>> 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.
Well, something does the wrong thing, anyway:
debian-gfortran:~/test> cat kill9.f90
program kill9
integer i1, i2, stat(2)
stat = kill( (/i1, i2/), (/9, 9/) )
end
debian-gfortran:~/test> ../bin-trunk/bin/gfortran kill9.f90 -o kill9
kill9.f90: In function 'MAIN__':
kill9.f90:1: internal compiler error: in gfc_conv_intrinsic_funcall, at
fortran/trans-intrinsic.c:1452
Ideally, since KILL is documented as an elemental function, this ought
to work. Though we could just make it non-elemental and put in checks,
as the simple way out.
- Brooks
More information about the Gcc-patches
mailing list