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.

WDYT?

Is that only happening for `nullptr_t`?

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


https://reviews.llvm.org/D23041



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to