XL Fortran compiler diagnostic aids

Compilation return codes
XL Fortran compiler listings
Debugging compiled applications

XL Fortran issues diagnostic messages when it encounters problems compiling your application. You can use these messages to help identify and correct such problems.

This section provides a brief overview of the main diagnostics messages offered by XL Fortran. For more information about related compiler options that can help you resolve problems with your application, see Options for error checking and debugging and Options that control listings and messages.

Compilation return codes

At the end of compilation, the compiler sets the return code to zero under any of the following conditions:

Otherwise, the compiler sets the return code to one of the following values:

Return Code Error Type
1 An error with a severity level higher than the setting of the -qhalt compiler option has occurred.
40 An option error or unrecoverable error has occurred.
41 A configuration file error has occurred.
250 An out-of-memory has occurred. The compiler invocation command cannot allocate any more memory for its use.
251 A signal-received error has occurred. That is, an unrecoverable error or interrupt signal has occurred.
252 A file-not-found error has occurred.
253 An input/output error has occurred - files cannot be read or written to.
254 A fork error has occurred. A new process cannot be created.
255 An error has been detected while the process was running.
Note:
Return codes may also be displayed for runtime errors.

XL Fortran compiler listings

Diagnostic information is produced in the output listing according to the settings of the -qlist, -qsource, -qxref, -qattr, -qreport, and -qlistopt compiler options. The -S option generates an assembler listing in a separate file.

If the compiler encounters a programming error when compiling an application, the compiler issues a diagnostic message to the standard error device and, if the appropriate compiler options have been selected, to a listing file.

To locate the cause of a problem with the help of a listing, you can refer to:

A heading identifies each major section of the listing. A string of "greater than" (>) symbols precede the section heading so that you can easily locate its beginning:

>>>>> section name

You can select which sections appear in the listing by specifying the appropriate compiler options. For more information about these options see Options for error checking and debugging and Options that control listings and messages.

Debugging compiled applications

Specifying the -g or -qlinedebug compiler options at compile time instructs the XL Fortran compiler to include debugging information in compiled output. You can then use gdb or any other symbolic debugger to step through and inspect the behavior of your compiled application.