https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116031
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- int32_t s; int32_t *n = &s; uint32_t o = 1912123656; c(*n >> (*l + (int32_t)o >= 0)); First off s is uninitialized. So it being 0 is valid and 0 shifted by any value is still 0 so the overflow add is optimized away.