Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / tsan / thread_end_with_ignore.cpp
blobb33c9c9fd628343c5ce590025b1b69f4a424a4d6
1 // RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
3 // ReportIgnoresEnabled is disabled on Darwin, see comment in tsan_rtl_thread.cpp.
4 // UNSUPPORTED: darwin
5 #include "test.h"
7 void *Thread(void *x) {
8 AnnotateIgnoreReadsBegin("", 0);
9 return 0;
12 int main() {
13 pthread_t t;
14 pthread_create(&t, 0, Thread, 0);
15 pthread_join(t, 0);
18 // CHECK: ThreadSanitizer: thread T1 finished with ignores enabled, created at:
19 // CHECK: #0 pthread_create
20 // CHECK: #1 main
21 // CHECK: Ignore was enabled at:
22 // CHECK: #0 AnnotateIgnoreReadsBegin
23 // CHECK: #1 Thread