https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56369
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |7.0 Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Fixed in GCC 7+ by r7-1411. Basically it does: status1 = old_status < 0 ? old_status : 0; status1 >= 0 And converts the condition into "old_status >= 0" and then the MIN_EXPR can be sinked.