-qstrict_induction

Pragma equivalent

None.

Purpose

Prevents the compiler from performing induction (loop counter) variable optimizations. These optimizations may be unsafe (may alter the semantics of your program) when there are integer overflow operations involving the induction variables.

Syntax

Read syntax diagramSkip visual syntax diagram
        .-strict_induction---.   
>>- -q--+-nostrict_induction-+---------------------------------><

Defaults

  • -qstrict_induction
  • -qnostrict_induction when -O2 or higher optimization level is in effect

Usage

When using -O2 or higher optimization, you can specify -qstrict_induction to prevent optimizations that change the result of a program if truncation or sign extension of a loop induction variable should occur as a result of variable overflow or wrap-around. However, use of -qstrict_induction is generally not recommended because it can cause considerable performance degradation.

Predefined macros

None.

Related information



Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us