]> git.proxmox.com Git - rustc.git/blame - src/compiler-rt/test/tsan/thread_end_with_ignore3.cc
New upstream version 1.19.0+dfsg3
[rustc.git] / src / compiler-rt / test / tsan / thread_end_with_ignore3.cc
CommitLineData
92a42be0 1// RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
1a4d82fc
JJ
2extern "C" void AnnotateIgnoreReadsBegin(const char *f, int l);
3extern "C" void AnnotateIgnoreReadsEnd(const char *f, int l);
4
5int main() {
6 AnnotateIgnoreReadsBegin("", 0);
7 AnnotateIgnoreReadsBegin("", 0);
8 AnnotateIgnoreReadsEnd("", 0);
9 AnnotateIgnoreReadsEnd("", 0);
10 AnnotateIgnoreReadsBegin("", 0);
11 AnnotateIgnoreReadsBegin("", 0);
12 AnnotateIgnoreReadsEnd("", 0);
13}
14
15// CHECK: ThreadSanitizer: main thread finished with ignores enabled
16// CHECK: Ignore was enabled at:
17// CHECK: #0 AnnotateIgnoreReadsBegin
18// CHECK: #1 main {{.*}}thread_end_with_ignore3.cc:10
19// CHECK: Ignore was enabled at:
20// CHECK: #0 AnnotateIgnoreReadsBegin
21// CHECK: #1 main {{.*}}thread_end_with_ignore3.cc:11
22