1 // RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
4 void *Thread(void *a
) {
5 barrier_wait(&barrier
);
11 barrier_init(&barrier
, 2);
14 pthread_create(&t
, 0, Thread
, &Var
);
16 barrier_wait(&barrier
);
20 // CHECK: WARNING: ThreadSanitizer: data race
21 // CHECK: Location is stack of main thread.