Sets the default size of REAL, DOUBLE PRECISION, COMPLEX, and DOUBLE COMPLEX values.
This option is intended for maintaining compatibility with code that is written for other systems. You may find it a useful alternative to the -qautodbl option in some situations.
.-4-. >>- -q--realsize--=--+-8-+-------------------------------------><
@PROCESS:
@PROCESS REALSIZE(bytes)
The default, -qrealsize=4, is suitable for programs that are written specifically for 32-bit computers.
This option is intended to allow you to port programs unchanged from systems that have different default sizes for data. For example, you might need -qrealsize=8 for programs that are written for a CRAY computer.
-qautodbl is related to -qrealsize, although you cannot combine these options. When the -qautodbl option turns on automatic doubling, padding, or both, the -qrealsize option has no effect.
Setting -qrealsize to 8 overrides the setting of the -qdpc option.
In addition to type REAL, -qrealsize also works for type vector(real).
The option affects the sizes1 of constants, variables, derived type components, and functions (which include intrinsic functions) for which no kind type parameter is specified. Objects that are declared with a kind type parameter or length, such as REAL(4) or COMPLEX*16, are not affected.
Data Object REALSIZE(4) in Effect REALSIZE(8) in Effect
-------------------------------------------------------------------
1.2 REAL(4) REAL(8)
1.2e0 REAL(4) REAL(8)
1.2d0 REAL(8) REAL(16)
1.2q0 REAL(16) REAL(16)
REAL REAL(4) REAL(8)
DOUBLE PRECISION REAL(8) REAL(16)
COMPLEX COMPLEX(4) COMPLEX(8)
DOUBLE COMPLEX COMPLEX(8) COMPLEX(16)
@PROCESS REALSIZE(8)
REAL R ! treated as a real(8)
REAL(8) R8 ! treated as a real(8)
VECTOR(REAL) ! treated as a vector(real(8))
VECTOR(REAL(4)) ! treated as a vector(real(4))
DOUBLE PRECISION DP ! treated as a real(16)
DOUBLE COMPLEX DC ! treated as a complex(16)
COMPLEX(4) C ! treated as a complex(4)
PRINT *,DSIN(DP) ! treated as qsin(real(16))
! Note: we cannot get dsin(r8) because dsin is being treated as qsin.
END
INTRINSIC DABS ! Argument and return type become REAL(16).
DOUBLE PRECISION DABS ! OK, because DOUBLE PRECISION = REAL(16)
! with -qrealsize=8 in effect.
REAL(16) DABS ! OK, the declaration agrees with the option setting.
REAL(8) DABS ! The declaration does not agree with the option
! setting and is ignored.