Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / tsan / thread_leak4.c
blob1d0636f1a4c00d0b828be0ae259aba94617373fd
1 // RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
2 #include "test.h"
4 void *Thread(void *x) {
5 sleep(100); // leave the thread "running"
6 return 0;
9 int main() {
10 pthread_t t;
11 pthread_create(&t, 0, Thread, 0);
12 fprintf(stderr, "DONE\n");
13 return 0;
16 // CHECK: DONE
17 // CHECK-NOT: WARNING: ThreadSanitizer: thread leak