https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83133
--- Comment #14 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Maxim Egorushkin from comment #13) > It looks like -fstrict-overflow flag is there to enable exactly this kind of > optimization. Yes, and it is set by default. Meaning that ALL code has to be reviewed for undefined overflows just because of this optimization.