[libcxx-commits] [PATCH] D102844: XFAIL align.pass.pass.cpp on aix regarding atomic alignment
Hubert Tong via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu May 20 10:52:47 PDT 2021
hubert.reinterpretcast added inline comments.
================
Comment at: libcxx/test/libcxx/atomics/atomics.align/align.pass.pass.cpp:37
using AtomicImpl = decltype(this->__a_);
assert(alignof(AtomicImpl) >= sizeof(AtomicImpl) &&
"expected natural alignment for lock-free type");
----------------
cebowleratibm wrote:
> hubert.reinterpretcast wrote:
> > This is a statically-determined fact, but the storage for the object could be aligned even if the type's guaranteed alignment is less-than-natural. We now have `is_always_lock_free`.
> Are you saying the test is invalid because some of the types below may have less than natural alignment and `is_lock_free()` is permitted to return true based on the actual alignment of the particular object?
I recall reading this before... the test is valid:
In any given program execution, the result of the lock-free query is the same for all atomic objects of the same type.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102844/new/
https://reviews.llvm.org/D102844
More information about the libcxx-commits
mailing list