https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65492
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |6.0 Resolution|--- |FIXED Status|NEW |RESOLVED Known to work| |6.1.0 See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=66002 --- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> --- This is fixed in GCC 6, we produce: _76 = MIN_EXPR <offset_99, 255>; offset_75 = MAX_EXPR <_76, 1>; ... _104 = offset_75 + -1; Rather than: offset_30 = _52 <= 254 ? offset_67 : 1; prephitmp_119 = _52 <= 254 ? pretmp_118 : 0; _17 = offset_67 <= 255; offset_69 = _17 ? offset_30 : 255; prephitmp_109 = _17 ? prephitmp_119 : 254; This was fixed by r6-528. PR 66002 is describing almost the same issue even.