Fortran User's Guide

-g

Compile for debugging.

    SPARC: 77/90 x86:77

Produce additional symbol table information for the debugging with dbx(1) and the Sun WorkShop debugging utility.

Although a some debugging is possible without specifying -g, the full capabilities of dbx and debugger are only available to those compilation units compiled with -g.

Some capabilities of other options specified along with -g may be limited. The -g option suppresses the automatic inlining usually obtained with -O4, but it does not suppress -On optimizations.

-g cancels any parallelization option (-autopar, -explicitpar, -parallel) as well as -depend and -reduction. Debugging is facilitated by specifying -g without any optimization or parallelization options since not all debugging features are available when these options are invoked. See the dbx documentation for details.

For x86: -g is ignored when specified with a -On option or -fast.

For SPARC: The -g option makes -xildon the default incremental linker option (see "-xildon"). That is, with -g, the compiler default behavior is to automatically invoke ild in place of ld, unless the -G option is present, or any source file is named on the command line.