[libcxx-commits] [libcxx] [libcxx][test] Prevent compiler optimising out uses of 64-bit atomics (PR #172517)

David Spickett via libcxx-commits libcxx-commits at lists.llvm.org
Tue Dec 16 08:39:22 PST 2025


DavidSpickett wrote:

I'm not sure whether:
* This is something we want to do at all.
* If we do it, we must also run the tests at -O1 to make sure it continues to work.
* You would also require me to do this in all places, rather than just the ones to provoke the linker error.

There is also 1 more UPASSing test `std/atomics/atomics.types.operations/atomics.types.operations.req/ctor.pass.cpp`. The problem with this one is that it's testing constexpr code. So forcing that to be compile time I think would defeat the point, or at least, look strange to anyone reading it.

Really it needs a better encoding of the XFAIL, perhaps a compile time check for atomics. So that's why I've left that one out of this PR, I need to think more about it.

https://github.com/llvm/llvm-project/pull/172517


More information about the libcxx-commits mailing list