https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109362
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Reduced C testcase would be struct S { long a, b; }; int foo (struct S *v) { while (1) { __atomic_load_n (&v->a, __ATOMIC_ACQUIRE); if (__atomic_load_n (&v->b, __ATOMIC_ACQUIRE)) return 1; } }