[Bug c/66348] Simple loop has only lower half of the 64-bit counter initialized correctly

sebastiano.vigna at unimi dot it gcc-bugzilla@gcc.gnu.org
Tue Jun 2 07:21:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66348

--- Comment #5 from Sebastiano Vigna <sebastiano.vigna at unimi dot it> ---
Fantastic tool! I didn't know about it.

But it doesn't fire. There is no undefined behaviour in that code--it's just
that the optimizer at -O1 does something wrong.

I tried a binary search over the single options induced by -O1, but it turns
out it's a combination of things--when I split the options in two half, the
problem did not show up with either half.

The code is 30-40 lines of assembly--I guess someone proficient with the output
of the compiler could easily spot what's going wrong.



More information about the Gcc-bugs mailing list