[Bug c/103103] Incorrect integer optimization omits x < 0 comparison

2021-11-05 Thread k.melekhin at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103103 --- Comment #3 from Kyryl Melekhin --- Thank you! I figured that this has something to do with being UB behavior with int overflow, however it's strange to find this kind of bug only on 1 compiler, with no possible warnings or idications that

[Bug c/103103] Incorrect integer optimization omits x < 0 comparison

2021-11-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103103 --- Comment #2 from Andrew Pinski --- Also you can detect this at runtime with -fsanitize=undefined.

[Bug c/103103] Incorrect integer optimization omits x < 0 comparison

2021-11-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103103 Andrew Pinski changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED