Use the -g option to direct the compiler to generate code to support symbolic debugging. For example:
IA-32 applications: prompt>ifc -g prog1.f
ItaniumŪ-based applications: prompt>efc -g prog1.f
The compiler lets you generate code to support symbolic debugging while the -O1, or -O2 optimization options are specified on the command line along with -g.
If you specify the -O1, or -O2 options with the -g option, you can receive these results:
some of the debugging information returned may be inaccurate as a side-effect of optimization.
for IA-32 applications, -O1, or -O2 options disable the -fp option. See -fp Option and Debugging.
The compiler does not support the generation of debugging information in assembly files. If you specify the -g option with -S, the assembly listing file is generated without debugging information, but if you further produce an object file, it will contain debugging information. If you link the object file and then use the GDB debugger on it, you will get full symbolic representation.