Home | History | Annotate | Download | only in output_tests
      1 #include <pthread.h>
      2 
      3 int X;
      4 
      5 void *Thread1(void *x) {
      6   X = 42;
      7   X = 66;
      8   X = 78;
      9   return 0;
     10 }
     11 
     12 void *Thread2(void *x) {
     13   X = 11;
     14   X = 99;
     15   X = 73;
     16   return 0;
     17 }
     18 
     19 int main() {
     20   pthread_t t;
     21   pthread_create(&t, 0, Thread1, 0);
     22   Thread2(0);
     23   pthread_join(t, 0);
     24 }
     25 
     26 // CHECK: ThreadSanitizer: reported 1 warnings
     27 
     28