[PATCH] D23041: Un-XFAIL GCC atomics.align

JF Bastien via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 3 13:43:24 PDT 2016

jfb added a comment.

@EricWF ran this on configuration `cxx_under_test=g++-4.9`. It generates the following error:

  libcxx/test/libcxx/atomics/atomics.align/align.pass.sh.cpp:32: atomic_test<T>::atomic_test() [with T = std::nullptr_t]: Assertion `alignof(this->__a_) >= sizeof(this->__a_) && "expected natural alignment for lock-free type"' failed.

I think GCC is broken. See the following (semi-relevant) test: https://godbolt.org/g/pFUqVY
That's not quite what I'm testing (this used libstdc++ and looks at `std::atomic`, not the value contained), but I'd nonetheless expect the `std::atomic` container to be sufficiently aligned.


Is that only happening for `nullptr_t`?

I can conditionally disable the `nullptr_t` test for GCC, and file a bug on GCC.


More information about the cfe-commits mailing list