C++ User's Guide

Interactions

Debugging with -g does not suppress -xO[level], but -xO[level] limits -g in certain ways.

The -xO3 and -xO4 options reduce the utility of debugging so that you cannot display variables from dbx, but you can still use the dbx where command to get a symbolic traceback.

The -xinline option has no effect for optimization levels below -xO3. At -xO4, the optimizer decides which functions should be inlined, and does so without the -xinline option being specified. At -xO4, the compiler also attempts to determine which functions will improve performance if they are inlined. If you force inlining of a function with -xinline, you might actually diminish performance.