Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / dfsan / origin_overlapped.c
blob1758d60a020938f5a107c4567b84b52afb415646
1 // RUN: %clang_dfsan -gmlt -mllvm -dfsan-track-origins=1 %s -o %t && \
2 // RUN: %run %t >%t.out 2>&1
3 // RUN: FileCheck %s < %t.out
5 #include <sanitizer/dfsan_interface.h>
7 int main(int argc, char *argv[]) {
8 char volatile z1;
9 char volatile z2;
10 dfsan_set_label(8, (void *)&z1, sizeof(z1));
11 dfsan_set_label(16, (void *)&z2, sizeof(z2)); // overwritting the old origin.
12 char c = z1;
13 dfsan_print_origin_trace(&c, "bar");
14 return 0;
17 // CHECK: Taint value 0x8 {{.*}} origin tracking (bar)
18 // CHECK: Origin value: {{.*}}, Taint value was stored to memory at
19 // CHECK: #0 {{.*}} in main {{.*}}origin_overlapped.c:[[@LINE-7]]
21 // CHECK: Origin value: {{.*}}, Taint value was created at
23 // CHECK: #0 {{.*}} in main {{.*}}origin_overlapped.c:[[@LINE-12]]