Enhancement on identifying uninitialized variables during debugging -- -qinitalloc option
ChristineLi 2700064EHM Visits (1542)
Using uninitialized variables might cause program errors. XL Fortran has already provided the -qinitauto option to help users identify uninitialized automatic variables during debugging by initializing them to a specific value. Note that XL Fortran for AIX and Linux, V14.1 provides the enhancement, the -qinitalloc option, to handle uninitialized variables with the ALLOCATABLE or POINTER attributes that are allocated using the ALLOCATE statement.
As to the working pattern, the -qinitalloc option is similar to the -qinitauto option, and it is easier to understand if you are familiar with the -qinitauto option. Here are some highlights:
For derived type variables with default initialization, initialization with hex_value occurs before the default initialization, which means the default initialization overrides the -qinitalloc option.
For detailed rules about the option parameter, hex_value, and examples, see
For more information about NaN, see information center.