]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/tsan/libcxx/std_shared_ptr.cc
1 // RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
13 auto thingy
= std::make_shared
<int>(42);
14 t1
= std::thread([thingy
, &v1
] { v1
= *thingy
; });
15 t2
= std::thread([thingy
, &v2
] { v2
= *thingy
; });
20 printf("%d %d\n", v1
, v2
);
21 // CHECK-NOT: ThreadSanitizer: data race