You use the
/Ot (Favor Fast Code) compiler option when you build an application that is configured on the x64 platform in Microsoft Visual Studio 2005 Service Pack 1 (SP1). When you run the application, some
if statements may run incorrectly. Therefore, the results are unpredictable. For example, the
if statements may be skipped in the generated code of the application.
This problem only occurs in the following scenario.
- There are some MOV instructions between two compare operations.
- These compare operations use the same operands.
- The values of the operands are changed by the MOV instructions.
In this scenario, the
if statements in the second compare operation may be skipped.
Notes- This problem may also occur when you use the /O2 option or the /Ox option to build the application.
- This problem does not occur on the x86 platform.