[patch,gfortran] PR 22273: LEN() of INTENT(OUT) dummy
Erik Edelmann
erik.edelmann@iki.fi
Fri Oct 14 10:12:00 GMT 2005
On Fri, Oct 14, 2005 at 11:11:01AM +0200, Thomas Koenig wrote:
> On Thu, Oct 13, 2005 at 05:42:52PM +0300, Erik Edelmann wrote:
> > :ADDPATCH fortran:
> >
> > Is there any reason why the len() intrinsic is excluded from the
> > inquiry function list in expr.c/check_inquiry()? By including it
> > (see attached patch) we would fix PR 22273.
>
> > Bootstrapped and reg.tested on Linux/x86. Please commit if OK.
>
> Does this actually work (and do something useful) at runtime?
Yes. For exemple, the patch makes the following code work:
------------------ hum.f90 ---------------------
program PR22273
implicit none
character(10) :: s
call hum(s)
contains
subroutine hum(s1)
character(*), intent(out) :: s1
character(len(s1)) :: c
print *, len(c)
end subroutine hum
end program PR22273
------------------------------------------------
kl-nrb:~$ gfortran hum.f90
kl-nrb:~$ a.out
10
Erik
More information about the Fortran
mailing list