GAP Message (Diagnostic ID 30531)

Message

Store the value of the upper-bound expression of the loop at line %d into a temporary local variable, and use this variable as the new upper-bound expression of the loop. To do this, insert a statement of the form "temp = upper-bound of loop" right before the loop, where "temp" is the newly created local variable. Make sure to choose a variable name that is unique. Then, replace the loop's original upper-bound expression with "temp".

Advice

You should use a local-variable for the loop upper-bound if the upper-bound does not change during the execution of the loop. This enables the compiler to recognize the loop as a proper counted do loop, which in turn enables various loop optimizations including vectorization and parallelization.

This message appears when the compiler cannot output the exact upper-bound variable to be replaced.

Verify

Make sure that the value of the upper-bound expression does not change throughout the entire execution of the loop.

See Also


Submit feedback on this help topic

Copyright © 1996-2010, Intel Corporation. All rights reserved.