https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103376
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Another testcase (from PR 103399) which shows the issue: int t1 = -2; int e(int) __attribute__((noipa)); int e(int f) { int t = 0; for (int d = 0; d < f; d ++) { for (int c = 0; c < ((f ? t1 : 0) ^ t1) + 1; c++) t= 42; } return t; } int main() { unsigned a = e(1); printf("%u\n", a); if (a != 42) __builtin_abort (); }