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.