https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111331
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Reduced testcase: ``` int a; int b; int main() { int d = b+30; { int t; if (d < 29) t = 29; else t = (d > 28) ? 28 : d; a = t; } volatile int t = a; if (a != 28) __builtin_trap(); } ```