https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117642
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 59709 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59709&action=edit gcc15-pr117642.patch Untested patch to just emit a call to (non-existent in libatomic) function. Up to the user to define it if they want, similarly to __sync_lock_test_and_set_16.