jfb added a comment. In D59307#1428101 <https://reviews.llvm.org/D59307#1428101>, @mibintc wrote:
> In D59307#1427644 <https://reviews.llvm.org/D59307#1427644>, @jfb wrote: > > > I think you also want to test C++ `std::atomic` ... > > > The bug described in https://bugs.llvm.org/show_bug.cgi?id=41033 doesn't > occur using C++ atomic, I rewrote the test case this way, and it compiles > without error. The "load" operation returns int since all the atomic > operations occur under the covers using builtins. Does this convey the test > you have in mind? > > #include <atomic> > int fum(int y) { > > std::atomic<int> x(1); > y = ({x.load();}); > > } What I had in mind with `atomic` isn't relevant, because it would try to call `atomic(const atomic&) = delete;`. Your test case here isn't something I'm worried about. `volatile` is still and issue. I'm still not sure this is something we want. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59307/new/ https://reviews.llvm.org/D59307 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits