Optimization levels vs. debugging levels
If you are specifying the -g, -G0, or -G1 compiler options for debugging purposes (e.g., in preparation for running your program with totalview), be aware that these options may have an effect on the optimization levels you specified:
If you specify -G0 (or equivalently -g), the compiler will automatically use -O0, overriding any -O options you specified.
If you specify -G1, things get a little more complicated. See the reference, or get a compiler listing (as explained in the next paragraph).
To see what compiler options are actually used in these cases (or in any case), you can request a compiler listing by using one of the -r options. For example:
f90 -r0 ... myprog.fwill create a listing file and put it in file myprog.lst.
Back