https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87346
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |DUPLICATE --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Again this has nothing to do with the loop but rather the return value. If you want to detect this at runtime, you can use -fsantize=undefined . *** This bug has been marked as a duplicate of bug 87345 ***