https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121022
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |DUPLICATE
Status|UNCONFIRME
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121022
Andrew Pinski changed:
What|Removed |Added
Severity|normal |enhancement
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121022
--- Comment #1 from Yangfl ---
The motivation:
#include
#include
bool refcnt_release(atomic_int *refcnt) {
int orig = atomic_fetch_sub_explicit(refcnt, 1, memory_order_release);
if (orig > 1) {
return false;
}
// atomic_thread_fe