https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69984
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> --- Why do you think this is a bug? Look at: C = A * B; This is the same as C = (unsigned long)( ((int)A) * ((int)B) ) due to C/C++ promotion rules. So C is less than 31bits. E is also the same. Use -fwrapv to say A * B is defined as wrapping or use casts to unsigned int before doing the multiplication.