revap types, step 1

Paul Brook paul@codesourcery.com
Thu Aug 26 21:26:00 GMT 2004


On Thursday 26 August 2004 22:05, Steve Kargl wrote:
> NAG
>   -r8  Double  the size of default REAL/COMPLEX, and on machines for
>        which quadruple-precision REAL/COMPLEX are available,  double
>        the  size  of  DOUBLE PRECISION.  REAL/COMPLEX specified with
>        explicit KIND numbers or byte lengths are  unaffected  -  but
>        since  the  KIND  intrinsic  returns the correct values, COM-
>        PLEX(KIND(0d0)) on a machine  with  quad-precision  floating-
>        point will correctly select quad-precision COMPLEX.
>
> So, if a target supports QUAD, then I think we should promote
> DOUBLE PRECISION to QUAD.  If a target does not support QUAD,
> then we ignore promotion of DOUBLE PRECISION.

This sounds like the best course of action.
AFAIK the motivation for -r8 is compatibility with the Cray compiler. This has 
sizeof(0.0)==8 and sizeof(0d0)==16.
Leaving DOUBLE PRECISION unchanged on systems that don't support kind=16 seems 
a reasonable compromise. We obviously we should document this behaviour in 
invoke.texi ;)

Paul



More information about the Fortran mailing list