I have a short program that I believe causes MSVC 2010 to generate bad optimizations, leading to a crash at runtime.It's valid C++ as far as I can tell. The debug build of this program runs fine.Looking at the disassembly of the 'release' compile, it appears that some instruction re-ordering is a little over-zealous and causes the dereference of an invalid pointer.I am using MSVC Express 2010, version "10.0.30319.1 RTMRel"
Visual Studio/Team Foundation Server/.NET Framework Tooling version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results