Double the default size for REAL, INTEGER, DOUBLE, and COMPLEX.
SPARC:77 x86:77
This option, and -r8, are now considered obsolete and may be removed in future releases. Use the more general -xtypemap option instead.
-dbl promotes the default byte size for REAL, INTEGER,DOUBLE,and COMPLEX variables declared without an explicit byte size as follows:
Table 3-14 Default Data Sizes and -dbl (Bytes)
Without -dbl option |
With -dbl option |
||
---|---|---|---|
Data Type |
default |
SPARC |
x86 |
INTEGER |
4 |
8 |
8 |
REAL |
4 |
8 |
8 |
DOUBLE |
8 |
16 |
8 |
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.
Compare -dbl with -r8: -dbl and -r8 can be expressed in terms of the more general -xtypemap= option:
On SPARC:
-dbl equals: -xtypemap=real:64,double:128,integer:64 -r8 equals: -xtypemap=real:64,double:128,integer:mixed
These options promote default DOUBLE PRECISION data to QUAD PRECISION (128 bits). This may be unwanted and may cause performance degradation. -xtypemap=real:64,double:64,integer:64 might be more appropriate than -dbl in these cases.
On x86:
-dbl equals: -xtypemap=real:64,double:64,integer:64 -r8 equals: -xtypemap=real:64,double:64,integer:mixed
For all of the floating point data types, -dbl works the same as -r8; using both -r8 and -dbl produces the same results as using only -dbl.
For INTEGER and LOGICAL data types, -dbl is different from -r8:
-dbl allocates 8 bytes, and does 8-byte arithmetic
-r8 allocates 8 bytes, and does only 4-byte arithmetic ("mixed")
In general, if you compile one subprogram with -dbl, then be sure to compile all subprograms of that program with -dbl. This is particularly important with programs communicating through files with unformatted I/O -- if one program is compiled with -dbl, then the other program must similarly be 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.