This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [patch, fortran] PR30371: KILL subroutine accepts array arguments.
On Thu, Jan 04, 2007 at 05:38:18PM -0800, Brooks Moses wrote:
> 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.
>
I think the ELEMENTAL marking is incorrect because kill() is
only present due to backwards compatibility with g77. g77.info
says the arguments are scalar. The implementation in kill.c
suggests that these should also be scalar.
--
Steve