If you assign twice to the same variable, the compiler will remove the first one. The second assignment would have to at least be dependent on something unknown at compile time. Check the assembly, you should see that there is only one assignment in both cases.
-
-
(Although for a test such as the one you are doing, you really should just write the ASM and run it under perf on Linux, that would be my suggestion - because it will be hard to get the compiler to output the right ASM to test what you are trying to test.)
-
This Tweet is unavailable.
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.