This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: revap types, step 1


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]