1 // RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
2 // RUN: %clangxx_tsan -O2 %s -o %t && %run %t 2>&1 | FileCheck %s
3 // RUN: %clangxx_tsan -O3 %s -o %t && %run %t 2>&1 | FileCheck %s
5 // Check that load widening is not tsan-hostile.
17 void *Thread1(void *x
) {
22 void *Thread2(void *x
) {
29 memset(&S
, 123, sizeof(S
));
30 pthread_create(&t
[0], NULL
, Thread1
, NULL
);
31 pthread_create(&t
[1], NULL
, Thread2
, NULL
);
32 pthread_join(t
[0], NULL
);
33 pthread_join(t
[1], NULL
);
34 fprintf(stderr
, "PASS\n");
37 // CHECK-NOT: WARNING: ThreadSanitizer: data race