(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
tsan/
thread_leak.c
       1  #include <pthread.h>
       2  #include <stdio.h>
       3  
       4  void *Thread(void *x) {
       5    return 0;
       6  }
       7  
       8  int main() {
       9    pthread_t t;
      10    pthread_create(&t, 0, Thread, 0);
      11    pthread_join(t, 0);
      12    fprintf(stderr, "PASS\n");
      13    return 0;
      14  }
      15  
      16  /* { dg-prune-output "WARNING: ThreadSanitizer: thread leak.*" } */