[PATCH] more g77 runtime library functions for gfortran

Paul Brook paul@codesourcery.com
Wed Aug 18 01:07:00 GMT 2004


On Saturday 14 August 2004 20:51, Steve Kargl wrote:
> This patch implements the following nonstandard intrinsic
> functions included in the g77 runtime library:
>
>   DFLOAT   -- convert an integer to double precision
>   [D]BESJ0 -- Bessel function of order 0 and real argument
>   [D]BESJ1 -- Bessel function of order 1 and real argument
>   [D]BESJN -- Bessel function of order N and real argument
>   [D]BESY0 -- Bessel function of order 0 and real argument
>   [D]BESY1 -- Bessel function of order 1 and real argument
>   [D]BESYN -- Bessel function of order N and real argument

I have a few issues with this patch.

1) The library functions should be named foo_r4 and foo_r8, not foo and dfoo.
2) The resolution functions are wrong. sizeof(float) is defined by the target 
(currently assumed to be 4). kind(0.0) is selectable by the user at compile 
time.
3) The parameters to the library functions should be passed by value, not by 
reference.
4) Is using these intrinsics as actual arguments supposed to work?
(it doesn't). Maybe this was the reasoning behind (3)?
5) I don't think a warning/error is the correct behaviour for --std=f95. 
Wouldn't it be better to disable the intrinsic altogether? A warning may be a 
good idea, but it's not what I'd expect in strict standard compliant mode.

Paul



More information about the Fortran mailing list