https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111445
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Wrong code at -Os on |[12/13/14 Regression] Wrong |x86_64-linux-gnu since |code at -Os on |r12-1077-g57bf3751511 |x86_64-linux-gnu since | |r12-1077-g57bf3751511 Ever confirmed|0 |1 Last reconfirmed| |2023-09-17 Keywords| |wrong-code Status|UNCONFIRMED |NEW Target Milestone|--- |12.4 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. Though I think r12-1077-g57bf3751511 just exposed the issue. -fno-ivopts causes the bug to go away. So does -fwrapv . So I suspect IV-OPTS is introducing some signed integer overflow for this ...