Specifying the compile-time option -CU causes unassigned variable checking to be enabled: that is, before an expression is evaluated at runtime, a check is normally made that any variables in the expression have previously been assigned values. If any has not, a runtime error results.
Some variables are not unassigned-checked, even when -CU has been selected:
Variables of type character
byte, integer(1) and logical(1) variables
Variables of derived type, when the complete variable (not individual fields) is used in the expression
Arguments passed to some elemental and transformational intrinsic procedures
Variables that specify storage with allocate, except those of types noted in the previous section, will be unassigned-checked when -CU is selected.
If the variables in a named COMMON block are to be unassigned-checked, -CU must be selected, and:
- The COMMON block must be specified in one and only one BLOCK DATA program unit. Variables in the COMMON block that are not explicitly initialized will be subject to the unassigned check.
- No variable of the COMMON block may be initialized outside the BLOCK DATA program unit.
Variables in blank COMMON will be subject to the unassigned check if -CU is selected and the blank COMMON appears in the main program unit. In this case, although the Intel® Fortran Compiler permits blank COMMON to have different sizes in different program units, only the variables within the extent of blank COMMON indicated in the main program unit will be subject to the unassigned check.