Sets the size of default INTEGER and LOGICAL data entities that have no length or kind specified.
This option is not intended as a general-purpose method for increasing the sizes of data entities. Its use is limited to maintaining compatibility with code that is written for other systems.
.-4-. >>- -q--intsize--=--+-2-+-------------------------------------->< '-8-'
@PROCESS:
@PROCESS INTSIZE(bytes)
-qintsize=4
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 -qintsize=2 for programs that are written for a 16-bit microprocessor or -qintsize=8 for programs that are written for a CRAY computer. The default value of 4 for this option is suitable for code that is written specifically for many 32-bit computers. Note that specifying the -q64 compiler option does not affect the default setting for -qintsize.
You might need to add PARAMETER statements to give explicit lengths to constants that you pass as arguments.
The specified size1 applies to these data entities:
@PROCESS INTSIZE(8)
PROGRAM INTSIZETEST
INTEGER I
I = -9223372036854775807 ! I is big enough to hold this constant.
J = ABS(I) ! So is implicit integer J.
IF (I .NE. J) THEN
PRINT *, I, '.NE.', J
END IF
END
CALL SUB(17)
END
SUBROUTINE SUB(I)
INTEGER(4) I ! But INTSIZE may change "17"
! to INTEGER(2) or INTEGER(8).
…
END
If you change the default value, you must either
declare the variable I as INTEGER instead
of INTEGER(4) or give a length to the actual
argument, as follows: @PROCESS INTSIZE(8)
INTEGER(4) X
PARAMETER(X=17)
CALL SUB(X) ! Use a parameter with the right length, or
CALL SUB(17_4) ! use a constant with the right kind.
END