1 // RUN: echo "race_top:TopFunction" > %t.supp
2 // RUN: %clangxx_tsan -O1 %s -o %t
3 // RUN: TSAN_OPTIONS="$TSAN_OPTIONS suppressions='%t.supp'" %deflake %run %t 2>&1 | FileCheck %s
9 void AnotherFunction(int *p) {
13 void TopFunction(int *p) {
17 void *Thread(void *x) {
18 barrier_wait(&barrier);
24 barrier_init(&barrier, 2);
26 pthread_create(&t, 0, Thread, 0);
28 barrier_wait(&barrier);
32 // CHECK: WARNING: ThreadSanitizer: data race