Any of the following coding practices, and many others, could cause problems with an optimization level of -O3 or -O4:
A program unit does arithmetic with the pointer.
A subprogram saves the address of any of its arguments between calls.
A function returns the address of any of its arguments, although it can return the value of a pointer argument.
A variable is referenced through a pointer, but the address of the variable is not explicitly taken with the LOC() or MALLOC() functions.
Example: Code that could cause trouble with -O3 or -O4:
COMMON A, B, C POINTER ( P, V ) P = LOC(A) + 4 Possible problems here if optimized ...
The compiler assumes that a reference through P may change A, but not B; this assumption could produce incorrect code.