Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / tsan / suppressions_mutex.cpp
blob5d3a5d05289f1117e93881594fa65f232d51df12
1 // RUN: %clang_tsan -O1 %s -o %t && %env_tsan_opts=suppressions='%s.supp' %run %t 2>&1 | FileCheck %s
2 #include "test.h"
4 void __attribute__((noinline)) suppress_this(pthread_mutex_t *mu) {
5 pthread_mutex_destroy(mu);
8 int main() {
9 pthread_mutex_t mu;
10 pthread_mutex_init(&mu, 0);
11 pthread_mutex_lock(&mu);
12 suppress_this(&mu);
13 fprintf(stderr, "DONE\n");
14 return 0;
17 // CHECK-NOT: failed to open suppressions file
18 // CHECK-NOT: WARNING: ThreadSanitizer:
19 // CHECK: DONE