https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109166
--- Comment #7 from Hans-Peter Nilsson <hp at gcc dot gnu.org> --- (In reply to Hans-Peter Nilsson from comment #6) > The cause I guess, is just a bad fall-through in the arm/sync.md. Or rather, optabs.cc:expand_atomic_test_and_set, which makes this issue somewhat less target-specific. To wit: /* Failing all else, assume a single threaded environment and simply perform the operation. */