Intel® Fortran Compiler 17.0 Developer Guide and Reference
Tells the compiler to generate full debugging information in the object file.
Linux and macOS: | -g |
Windows: | See option Zi, Z7. |
None
OFF |
No debugging information is produced. |
Option -g tells the compiler to generate symbolic debugging information in the object file, which increases the size of the object file.
The compiler does not support the generation of debugging information in assemblable files. If you specify this option, the resulting object file will contain debugging information, but the assemblable file will not.
This option turns off option -O2 and makes option -O0 the default unless option -O2 (or higher) is explicitly specified in the same command line.
Specifying the -g or -O0 option sets the -fno-omit-frame-pointer option. On Linux*, the -debug inline-debug-info option will be enabled by default if you compile with optimizations (option -O2 or higher) and debugging is enabled (option -g).
When option -g is specified, debugging information is generated in the DWARF Version 3 format. Older versions of some analysis tools may require applications to be built with the -gdwarf-2 option to ensure correct operation.
Visual Studio: None
Eclipse: None
Xcode: General > Generate Debug Information
Linux: None
Windows: /Zi, /Z7