]> git.proxmox.com Git - rustc.git/blame - src/compiler-rt/test/tsan/thread_leak2.c
New upstream version 1.12.0+dfsg1
[rustc.git] / src / compiler-rt / test / tsan / thread_leak2.c
CommitLineData
1a4d82fc
JJ
1// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
2#include <pthread.h>
3#include <stdio.h>
4
5void *Thread(void *x) {
6 return 0;
7}
8
9int main() {
10 pthread_t t;
11 pthread_create(&t, 0, Thread, 0);
12 pthread_detach(t);
5bcae85e 13 fprintf(stderr, "PASS\n");
1a4d82fc
JJ
14 return 0;
15}
16
17// CHECK-NOT: WARNING: ThreadSanitizer: thread leak