Parallel Programming Guide for HP-UX Systems

Troubleshooting
Chapter 9168
Optimization can remove instructions, replace them, and change the
order in which they execute. In some cases, improper optimizations can
cause unexpected or incorrect results or code that slows down at higher
optimization levels. In other cases, user error can cause similar problems
in code that contains improperly used syntactically correct constructs or
directives. If you encounter any of these problems, look for the following
possible causes:
Aliasing
False cache line sharing
Floating-point imprecision
Invalid subscripts
Misused directives and pragmas
Triangular loops
Compiler assumptions
NOTE Compilers perform optimizations assuming that the
source code being compiled is valid. Optimizations done on
source that violates certain ANSI standard rules can cause
the compilers to generate incorrect code.