Before you begin: For diagnostic purposes, you should always begin by using the simplest optimization level on your program. Once you address all problems at your current level, progress toward the more complex levels of optimization.
Perform the following steps to progress through the various levels of optimization:
If your program works successfully at OPT(0) and fails at OPT(2), try rebuilding the program specifying the compiler option NOANSIALIAS and re-running. You may suffer a performance penalty for this as the optimizer has to make worst-case aliasing assumptions but it may resolve the problem.
_______________________________________________________________
_______________________________________________________________
_______________________________________________________________
_______________________________________________________________
You know you are done when you have exploited all optimizations offered by the compiler.