https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104604
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work| |11.2.0 Target Milestone|--- |12.0 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Summary|wrong code with -O2 |[12 Regression]wrong code |-fconserve-stack |with -O2 VRP Complex |--param=vrp1-mode=ranger |integer division issue Last reconfirmed| |2022-02-19 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed, reduced testcase which shows the problem even at just -O2: typedef unsigned char u8; u8 g; __attribute__((noipa)) u8 foo (_Complex unsigned c) { _Complex unsigned t = 3; t /= c; u8 v = g; return v + t; } int main (void) { u8 x = foo (7); if (x) __builtin_abort (); return 0; }