1 // RUN: echo "race_top:TopFunction" > %t.supp
2 // RUN: %clangxx_tsan -O1 %s -o %t
3 // RUN: %env_tsan_opts=suppressions='%t.supp' %run %t 2>&1 | FileCheck %s
9 __attribute__((noinline
)) void TopFunction(int *p
) {
13 void *Thread(void *x
) {
14 barrier_wait(&barrier
);
20 barrier_init(&barrier
, 2);
22 pthread_create(&t
, 0, Thread
, 0);
24 barrier_wait(&barrier
);
26 fprintf(stderr
, "DONE\n");
29 // CHECK-NOT: WARNING: ThreadSanitizer: data race