1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This test uses new symbols that were not defined in the libc++ shipped on
11 // darwin11 and darwin12:
12 // XFAIL: with_system_lib=x86_64-apple-darwin11
13 // XFAIL: with_system_lib=x86_64-apple-darwin12
14 
15 // <memory>
16 
17 // shared_ptr
18 
19 // template <class T>
20 // void
21 // atomic_store(shared_ptr<T>* p, shared_ptr<T> r)
22 
23 #include <memory>
24 #include <cassert>
25 
26 int main()
27 {
28 #if __has_feature(cxx_atomic)
29     {
30         std::shared_ptr<int> p;
31         std::shared_ptr<int> r(new int(3));
32         std::atomic_store(&p, r);
33         assert(*p == *r);
34     }
35 #endif
36 }
37