https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103066
--- Comment #1 from Hongyu Wang <wwwhhhyyy333 at gmail dot com> --- __sync_val_compare_and_swap will be expanded to atomic_compare_exchange_strong by default, should we restrict the check and return under atomic_compare_exchange_weak which is allowed to fail spuriously?