Optimizer uses 64bit operation instead of 32bit operation - by Martin Ankerl

Status : 

 


2
0
Sign in
to vote
ID 3125746 Comments
Status Active Workarounds
Type Bug Repros 0
Opened 3/1/2017 2:47:26 AM
Access Restriction Public

Description

The compiler erroneously replaces a 32bit operation with a 64bit operation, leading to wrong calculation results. This problem occurs only in 64bit and with /O2 or above. The same error seems to occur in VS2010 and VS2013.
Sign in to post a comment.
Posted by Martin Ankerl on 3/1/2017 at 9:35 PM
According to ginny2016, this bug appears in Visual Studio 2015 Update 3, 2013, 2010, 2008 64-bit mode when an optimizer flag was used (/O2 and /O1).
See https://www.reddit.com/r/cpp/comments/5wwmi2/visual_studio_2015_compiler_bug_64bit_instead_of/dedzh5g/
Posted by Microsoft on 3/1/2017 at 4:21 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted.

Microsoft Visual Studio Connect Support Team
Posted by ildjarn on 3/1/2017 at 3:48 PM
This appears to be fixed as of compiler version 19.10.25027.