-qoptdebug

Category

Error checking and debugging

Pragma equivalent

None.

Purpose

When used with high levels of optimization, produces files containing optimized pseudocode that can be read by a debugger.

An output file with a .optdbg extension is created for each source file compiled with -qoptdebug. You can use the information contained in this file to help you understand how your code actually behaves under optimization.

Syntax

Read syntax diagramSkip visual syntax diagram
        .-nooptdebug-.   
>>- -q--+-optdebug---+-----------------------------------------><

Defaults

-qnooptdebug

Usage

-qoptdebug only has an effect when used with an option that enables the high-level optimizer, namely -O3 or higher optimization level, or -qhot,-qsmp, -qipa, or -qpdf. You can use the option on both compilation and link steps. If you specify it on the compile step, one output file is generated for each source file. If you specify it on the -qipa link step, a single output file is generated.

You must still use the -g or -qlinedebug option to include debugging information that can be used by a debugger.

For more information and examples of using this option, see Using -qoptdebug to help debug optimized programs.

Related information