Compile the code below with /O2 with vc2010 sp1. It produces the wrong result. see steps to reproduce for actual output.vc2010sp1 x64 is correctvc2008sp1 x86 is correctvc2010 no sp x86 shows the bugvc2010 sp1 x86 shows the bugQ:\temp>type x.c#include <stdio.h>unsigned int tn6__o0 = 0xcd00abcd;int main(){ unsigned int tn23__i0; tn23__i0 = ((((unsigned int)((((int)((tn6__o0) << 8))) >> 31)) & 0x7fffffU)); printf("tn23 is 0x%x \n",tn23__i0);}
Visual Studio/Team Foundation Server/.NET Framework Tooling version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results
Please wait...