FORTRAN 77 Language Reference

Some Problematic Code Practices

Any of the following coding practices, and many others, could cause problems with an optimization level of -O3 or -O4:

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.