https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108574
--- Comment #1 from Zhendong Su <zhendong.su at inf dot ethz.ch> --- Here is another reproducer likely for the same bug. Compiler Explorer: https://godbolt.org/z/Efvczc6f8 [556] % gcctk -O3 small.c [557] % ./a.out Floating point exception [558] % [558] % cat small.c int a, b, c, d, e, f, g = -1, h; void l() { if (!e) goto i; for (; g; g++) { b = ~d; int j = 0, k = 1; if (k && (b || f)) j = b; i: a = ~j; } } int main() { h = 3; for (; h; h--) { e = 1; int m = ~a, n = 1 % m; c = n; l(); } return 0; }