1 // RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
6 volatile int N1
= 2 << 10;
7 volatile int N2
= 32 << 10;
18 static void bar() { Y
++; }
20 void *Thread(void *p
) {
23 barrier_wait(&barrier
);
28 barrier_init(&barrier
, 2);
32 pthread_create(&t
, 0, Thread
, 0);
33 barrier_wait(&barrier
);
38 // CHECK: WARNING: ThreadSanitizer: data race
41 // CHECK: Previous write