1 // RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
6 void *Thread(void *a
) {
7 barrier_wait(&barrier
);
13 barrier_init(&barrier
, 2);
14 print_address("addr2=", 1, &x
);
16 pthread_create(&t
, 0, Thread
, 0);
18 barrier_wait(&barrier
);
22 // CHECK: addr2=[[ADDR2:0x[0-9,a-f]+]]
23 // CHECK: WARNING: ThreadSanitizer: data race
24 // CHECK: Location is global 'x' {{(of size 4 )?}}at [[ADDR2]] ({{.*}}+0x{{[0-9,a-f]+}})