[Bug c/106892] Wrong code at -O3 on x86_64-linux-gnu

2022-09-09 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106892 --- Comment #6 from Jakub Jelinek --- I would clean it even more: int a, b, c, d, e; int f[8]; int g() { while (a) a >>= 4; return 0; } int h(int i) { if (i >= '0') return i - '0'; //__builtin_unreachable (); } void j(int i) {

[Bug c/106892] Wrong code at -O3 on x86_64-linux-gnu

2022-09-09 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106892 --- Comment #5 from Martin Liška --- Clean up test-case: $ cat pr106892.c int a, b, c, d, e; int f[8]; int g() { while (a) a >>= 4; return 0; } int h(int i) { if (i >= '0') return i - '0'; } void j(int i) { b = 2; for (; g(

[Bug c/106892] Wrong code at -O3 on x86_64-linux-gnu

2022-09-09 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106892 Richard Biener changed: What|Removed |Added Status|WAITING |NEW CC|

[Bug c/106892] Wrong code at -O3 on x86_64-linux-gnu

2022-09-09 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106892 --- Comment #3 from Li Shaohua --- Yes, I reduced it too much. Here is the new one with return value in g() function. a, b, c, d, e; f[8]; g() { while (a) a >>= 4; return 0; } h(i) { if (i >= '0') return i - '0'; } j(i) { b = 2;

[Bug c/106892] Wrong code at -O3 on x86_64-linux-gnu

2022-09-09 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106892 Richard Biener changed: What|Removed |Added Last reconfirmed||2022-09-09 Ever confirmed|0

[Bug c/106892] Wrong code at -O3 on x86_64-linux-gnu

2022-09-08 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106892 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #1