[Bug tree-optimization/101501] [11/12 Regression] wrong code at -O3 on x86_64-linux-gnu
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 19 03:40:12 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101501
--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
unsigned char a = 55;
int main() {
unsigned char c;
d:
c = a-- * 52;
if (c)
goto d;
__builtin_printf("%d\n", a);
}
outputs 40 at -O3 instead of 255, and already fails with gcc-8. Cunroll seems
confused about the number of iterations of this loop.
More information about the Gcc-bugs
mailing list