https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78911
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> --- The mentioned revision is probably not probably the culprit. Reduced test-case: $ cat tc.i a, b, d, e; *c; static interlocked_cmpxchg64 (long long *p1) { __sync_val_compare_and_swap (p1, b, a); } get_cached_fd () { if (!c) return; e = interlocked_cmpxchg64 (&c[d]); } $ timeout 10 gcc -O3 -march=pentium-m -m32 -c -fPIC -Wall -fno-strict-aliasing -fno-omit-frame-pointer tc.i [triggers time-out] Can you see it also on trunk?