1 // RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
4 void *Thread2(void *a
) {
5 barrier_wait(&barrier
);
10 void *Thread(void *a
) {
13 pthread_create(&t
, 0, Thread2
, &Var
);
15 barrier_wait(&barrier
);
21 barrier_init(&barrier
, 2);
23 pthread_create(&t
, 0, Thread
, 0);
27 // CHECK: WARNING: ThreadSanitizer: data race
28 // CHECK: Location is stack of thread T1.