Data Options

The data options let you specify rules for how your Fortran data is treated by the compiler, optimizer, and code generator.

See Also
Compatibility Options

Language Options

Descriptions of Data Options

-[no]align

Default: -align

Analyzes and reorders memory layout for variables and arrays. See also -align recnbyte.

-align none

Default: Off

Tells the compiler not to add padding bytes anywhere in common blocks or structures.

-align [no]commons or -align [no]dcommons

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.

-align recnbyte

Default: -align rec8byte, -Zp8. -align rec8byte is the same as specifying -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 rec8byte

-Zp1

-alignment norecords or -align rec1byte

-Zp2

-align rec2byte

-Zp4

-align rec4byte  

-align   

-Zp8 with -align dcommons, -align all, or -align dcommons and -align records

-noalign

-Zp1, -align none, or -align nocommons and -align nodcommons and -align norecords

-align rec1byte

-align norecords

-align rec8byte

-align records

-align [no]records

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.

-align [no]sequence

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.

-assume [no]byterecl

Default: -assume nobyterecl

Specifies the use of byte units for unformatted files. This option:

The default value, -assume nobyterecl, specifies that the units for RECL values with unformatted files are in four-byte (longword) units.

-assume [no]dummy_aliases

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.

-assume [no]protect_constants

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.

-auto_scalar, -auto, and -save

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.

-double_size {64|128}

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.

-dyncom "blk1,blk2,..."

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"

-integer_size {16|32|64}

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:

-pg

Default: Off.

Compiles and links for function profiling with gprof(1).

This is the same as specifying -p or -qp.

-real_size {32|64|128}

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:

-safe_cray_ptr

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

-zero[-]

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.

For this option to be effective, you must use -save on the command line or have variables in your code specifically marked as SAVE.