https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108564
Bug ID: 108564
Summary: RISCV std::atomic<bool> needs libatomics
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: raj.khem at gmail dot com
Target Milestone: ---
following test generates a call to __atomic_exchange_1 with gcc trunk ( soon to
be gcc 13 ) if I use std::atomic<int> that seems to not need libatomic but
std::atomic<bool> does need libatomic. Is that expected ?
#include <atomic>
std::atomic<bool> _closed;
void test(void) {
_closed.exchange(true);
}