The data options let you specify rules for how your Fortran data is treated during compilation, optimization, and code generation.
See Also
Compatibility Options
Language Options
Default: Add padding to structures only. (No padding is added to common blocks.)
Alternate Syntax: -noalign
Tells the compiler not to add padding bytes anywhere in common blocks or structures. This is the same as -noalign.
Default: -align nocommons or -align nodcommons
Aligns the data items of all common blocks on natural boundaries up to 4 bytes (-align commons) or 8 bytes (-align dcommons) instead of the default byte boundary by adding padding bytes.
If your command line includes the -stand option, then the compiler ignores -align dcommons.
Default: -align rec16byte (which is the same as -Zp16 or -align records).
Alternate syntax: -Zp{1|2|4|8|16}
Specifies alignment constraint for structures on 1-, 2-, 4-, 8-, or 16-byte boundaries.
Aligns fields of records and components of derived types on the smaller of the size boundary specified (n can be 1, 2, 4, 8, or 16) or the boundary that will naturally align them.
Specifying -align recnbyte does not affect whether common blocks are naturally aligned or packed.
This option: |
Is the same as this option: |
-Zp |
-align records or -align rec16byte |
-Zp1 |
-align norecords or -align rec1byte |
-Zp2 |
-align rec2byte |
-Zp4 |
-align rec4byte |
-Zp8 |
-align rec8byte |
-Zp16 |
-align rec16byte or -align records |
-align none |
-noalign |
-align all |
specifies all of the following: -align nocommons, - align dcommons, -align records, -align nosequence |
Default: -align records
Requests that components of derived types and fields of records be aligned on natural boundaries up to 8 bytes (for derived types with the SEQUENCE statement) by adding padding. See -align sequence.
The -align norecords option requests that components and fields be aligned on arbitrary byte boundaries, instead of on natural boundaries up to 8 bytes, with no padding.
Default: -align nosequence
Tells the compiler that components of derived types with the SEQUENCE attribute will obey whatever alignment rules are currently in use. The default alignment rules align unsequenced components on natural boundaries.
The default value of -align nosequence means that components of derived types with the SEQUENCE attribute will be packed, regardless of whatever alignment rules are currently in use.
If your command line includes the -stand option, then the compiler ignores -align sequence.
Default: -assume nobyterecl
Specifies the use of byte units for unformatted files. This option:
Specifies that the units for an explicit OPEN statement RECL specifier value are in bytes.
Forces the record length value returned by an INQUIRE by output list to be in byte units.
The default value, -assume nobyterecl, specifies that the units for RECL values with unformatted files are in four-byte (longword) units.
Default: -assume nodummy_aliases
Alternate syntax: -common_args
Requires that the compiler assume that dummy (formal) arguments to procedures
share memory locations with other dummy arguments or with variables shared
through use association, host association, or common block use.
You only need to compile the called subprogram with -assume
dummy_aliases.
The program semantics involved with dummy aliasing do not strictly obey
the Fortran standard and they slow performance. Therefore, using the default
value, -assume nodummy_aliases,
will give the compiler better run-time performance. However, if a program
depends on dummy aliasing and you do not specify -assume
dummy_aliases, the run-time behavior of the program will be unpredictable.
In such programs, the results will depend on the exact optimizations that
are performed. In some cases, normal results will occur, but in other
cases, results will differ because the values used in computations involving
the offending aliases will differ.
For more information, see the information about the dummy aliasing assumption in the User's Guide Volume II: Optimizing Applications.
Default: -assume protect_constants
Specifies that constants are read-only.
The -assume noprotect_constants option tells the compiler to pass a copy of a constant actual argument. As a result, the called routine can modify this copy, even though the Fortran standard prohibits such modification. The calling routine does not modify the constant.
The default, -assume protect_constants, results in passing of a constant actual argument. Any attempt to modify it may result in an error.
Default: -auto_scalar (unless -recursive or -openmp is specified, in which case the default is -auto)
Alternate syntax for -auto: -automatic and -nosave
Alternate syntax for -save: -noauto and -noautomatic
Specifies where local variables are stored, if default local storage is not desired.
-auto_scalar causes allocation of scalar variables of intrinsic types INTEGER, REAL, COMPLEX, and LOGICAL to the stack.
-auto_scalar does not affect variables that appear in EQUIVALENCE or SAVE statements, or those that are in common blocks. -auto_scalar may provide a performance gain for your program, but if your program depends on variables having the same value as the last time the routine was invoked, your program may not function properly. Variables that need to retain their values across subroutine calls should appear in a SAVE statement.
-auto makes all local variables AUTOMATIC, causing all variables to be allocated on the stack, rather than in local static storage. It does not affect variables that have the SAVE attribute or appear in an EQUIVALENCE statement or in a common block.
-save saves all variables in static allocation except local variables within a recursive routine.
-auto might provide a performance gain for your program, but if your program depends on variables having the same value as the last time the routine was invoked, your program might not function properly.
Default: -double_size 64
Defines DOUBLE PRECISION and DOUBLE COMPLEX declarations, constants, functions, and intrinsics.
-double_size 64 defines DOUBLE PRECISION declarations, constants, functions, and intrinsics as REAL*8 and defines DOUBLE COMPLEX declarations, functions, and intrinsics as COMPLEX*16.
-double_size 128 defines DOUBLE PRECISION declarations, constants, functions, and intrinsics as REAL*16 and (for Fortran 90 and 95) defines DOUBLE COMPLEX declarations, functions, and intrinsics as COMPLEX*32.
Enables dynamic allocation of the specified common blocks at run time.
Example: For common blocks A, B, and C, use this syntax:
-dyncom "a,b,c"
Default: -integer_size 32
Alternate syntax: -i{2|4|8},
where 2, 4, and
8 stand for the KIND of integer and logical variables
Specifies the default size (in bits) of integer and logical declarations,
constants, functions, and intrinsics, where n
is 16, 32, or 64:
n is 16: Makes the default integer and logical variables 2 bytes long. INTEGER and LOGICAL declarations are treated as (KIND=2). Alternate syntax: -i2. See also INTEGER(KIND=2) Representation.
n is 32: Makes the default integer and logical variables 4 bytes long. INTEGER and LOGICAL declarations are treated as (KIND=4). Alternate syntax: -i4. See also INTEGER(KIND=4) Representation.
n is 64: Makes the default integer and logical variables 8 bytes long. INTEGER and LOGICAL declarations are treated as (KIND=8). Alternate syntax: -i8. See also INTEGER(KIND=8) Representation.
Default: Off.
Compiles and links for function profiling with gprof(1).
This is the same as specifying -p or -qp.
Default: -real_size 32
Alternate syntax: -r{8|16}, where 8 and 16 stand for the KIND of real variables.
Specifies the default size (in bits) of real and complex declarations, constants, functions, and intrinsics, where n is 32, 64, or 128:
n
is 32: Defines REAL declarations, constants, functions, and intrinsics
as REAL(KIND=4) (SINGLE PRECISION) and defines COMPLEX declarations, constants,
functions, and intrinsics as COMPLEX(KIND=4) (COMPLEX).
Alternate syntax: None.
See Also
REAL(KIND=4) (REAL) Representation
COMPLEX(KIND=4) (COMPLEX) Representation
n
is 64: Defines REAL declarations, constants, functions, and intrinsics
as REAL(KIND=8) (DOUBLE PRECISION) and defines COMPLEX declarations, constants,
functions, and intrinsics as COMPLEX(KIND=8) (DOUBLE COMPLEX).
Specifying -real_size
64 causes intrinsic functions to produce a REAL(KIND=8) or COMPLEX(KIND=8)
result instead of a REAL(KIND=4) or COMPLEX(KIND=4) result, unless the
argument is explicitly typed as REAL(KIND=4) or COMPLEX(KIND=4), including
CMPLX, FLOAT, REAL, SNGL, and AIMAG. For instance, references to the CMPLX
intrinsic produce DCMPLX results (COMPLEX(KIND=8)), unless the argument
to CMPLX is explicitly typed as REAL(KIND=4), REAL*4, COMPLEX(KIND=4),
or COMPLEX*8. In this case the resulting data type is COMPLEX(KIND=4).
Alternate syntax: -r8
or -autodouble
See Also
REAL(KIND=8) (DOUBLE PRECISION) Representation
COMPLEX(KIND=8) (DOUBLE COMPLEX) Representation
n
is 128: Defines REAL declarations, constants, functions, and intrinsics
as REAL(KIND=16) and defines COMPLEX declarations, constants, functions,
and intrinsics as COMPLEX(KIND=16).
Alternate syntax: -r16
See Also
REAL(KIND=16) Representation
COMPLEX(KIND=16) Representation
Default: Off (assume that Cray pointers do alias other variables)
Requires that the compiler assume that Cray pointers do not alias (that is, do not specify sharing memory between) other variables.
Consider the following example:
pointer (pb, b)
pb = getstorage()
do i = 1, n
b(i) = a(i) + 1
enddo
By default, the compiler assumes that b and a are aliased. To prevent such an assumption, specify the -safe_cray_ptr option, and the compiler will treat b(i) and a(i) as independent of each other.
However, if the variables are intended to be aliased with Cray pointers, using the -safe_cray_ptr option produces incorrect results. For the code example below, -safe_cray_ptr should not be used:
pointer (pb, b)
pb = loc(a(2))
do i=1, n
b(i) = a(i) +1
enddo
Default: Off (-zero-)
Initializes to zero all local scalar variables of intrinsic type INTEGER, REAL, COMPLEX, or LOGICAL that are saved and not already initialized.
Use -save on the command line to make all local variables specifically marked as SAVE.