Fortran User's Guide

-r8

Double default byte size for REAL,INTEGER, DOUBLE and COMPLEX.

    SPARC:77 x86:77

-r8 promotes the default byte size for REAL, INTEGER, DOUBLE, and COMPLEX variables declared without an explicit byte size as follows:

Table 3-17 Default Data Sizes and -r8 (Bytes)

Without -r8 option  

With -r8 option 

Data Type 

default 

SPARC 

x86 

  INTEGER

  REAL

  DOUBLE

16 

This option applies to variables, parameters, constants, and functions.

Also, LOGICAL is treated as INTEGER, COMPLEX as two REALs, and DOUBLE COMPLEX as two DOUBLEs.

-dbl and -r8 can be expressed in terms of the more general -xtypemap= option:

In general, if you compile one subprogram with -r8, then be sure to compile all subprograms of that program with -r8. This also important with programs communicating through unformatted I/O files -- if one program is compiled with -r8, then the other program must be similarly compiled. Be also aware that this option alters the default data size of function names, including calls to library functions, unless the function name is typed explicitly with a data size.

The impact on runtime performance may be great. With -r8, an expression like float = 15.0d0*float is evaluated in quadruple precision due to the declaration of the constant.

If you select both -r8 and -i2, the results are unpredictable.