I have the following piece of code:
When compiling with GCC, this gives me the expected resulting output:
However, with ICC (7.0), i get:
Looking at the assembly code generated by ICC, i notice that ebx is first moved to eax, and eax is incremented. Nothing is done further, so the contents of eax gets lost. Is this a bug in ICC ?