Error checking and debugging
The options in the following table allow you to detect and correct problems in your source code. In some cases, these options can alter your object code, increase your compile time, or introduce runtime checking that can slow down the execution of your application. The option descriptions indicate how extra checking can impact performance.
To control the amount and type of information you receive regarding the behavior and performance of your application, consult Listings, messages, and compiler information.
For information about debugging optimized code, see the XL Fortran Optimization and Programming Guide.
| Option name | @PROCESS directive | Description |
|---|---|---|
| -# | None. |
Previews the compilation steps specified on the command line, without actually invoking any compiler components. |
| -C, -qcheck | CHECK |
Generates code that performs certain types of runtime checking. |
| -gsplit-dwarf | None. |
Enables the DWARF debugging information to be generated in one or more separate .dwo files. |
| -qcudaerr (CUDA Fortran) | CUDAERR |
Controls whether the compiler automatically inserts error checking code for CUDA API calls. |
| -g, -qdbg | DBG |
Generates debugging information for use by a symbolic debugger, and makes the program state available to the debugging session at selected source locations. |
| -qflttrap | FLTTRAP |
Determines what types of floating-point exception conditions to detect at run time. |
| -qfullpath | None. |
When used with the -g or -qlinedebug option, this option records the full, or absolute, path names of source and include files in object files compiled with debugging information, so that debugging tools can correctly locate the source files. |
| -qfunctrace | None. |
Traces entry and exit points of procedures in your program. If your program contains C++ compilation units, this option also traces C++ catch blocks. |
| -qfunctrace_xlf_catch | None. |
Specifies the name of the catch tracing subroutine. |
| -qfunctrace_xlf_enter | None. |
Specifies the name of the entry tracing subroutine. |
| -qfunctrace_xlf_exit | None. |
Specifies the name of the exit tracing subroutine. |
| -qhalt | HALT |
Stops compilation before producing any object, executable, or assembler source files if the maximum severity of compile-time messages equals or exceeds the severity you specify. |
| -qhaltonmsg | HALTONMSG |
Stops compilation before producing any object files, executable files, or assembler source files if a specified error message is generated. |
| -qinfo | None. |
Produces or suppresses groups of informational messages. |
| -qinitalloc | INITALLOC |
Initializes allocatable and pointer variables that are allocated but not initialized to a specific value, for debugging purposes. |
| -qinitauto | None. |
Initializes uninitialized automatic variables to a specific value, for debugging purposes. |
| -qkeepparm | None. |
When used with -O2 or higher optimization, specifies whether procedure parameters are stored on the stack. |
| -qlinedebug | None. |
Generates only line number and source file name information for a debugger. |
| -qobject | OBJECT |
Specifies whether to produce an object file or to stop immediately after checking the syntax of the source files. |
| -qsigtrap | None. |
Sets up the specified trap handler to catch SIGTRAP and SIGFPE exceptions when compiling a file that contains a main program. |
| -qstackprotect | None. |
Provides protection against malicious input data or programming errors that overwrite or corrupt the stack. |
| -qwarn64 | None. |
Displays informational messages identifying statements that may cause problems with 32-bit to 64-bit migration. |
| -qxflag=dvz | None. |
Causes the compiler to generate code to detect floating-point divide-by-zero operations. |