Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / msan / noundef_analysis.cpp
blob47695ab63a612c0c38ae5337545a13b1eec8bfe4
1 // RUN: %clangxx_msan %s -fno-sanitize-memory-param-retval -o %t && %run %t >%t.out 2>&1
2 // RUN: FileCheck %s --check-prefix=MISSED --allow-empty < %t.out
3 // RUN: %clangxx_msan %s -mllvm -msan-eager-checks=1 -fno-sanitize-memory-param-retval -o %t && not %run %t >%t.out 2>&1
4 // RUN: FileCheck %s < %t.out
6 struct SimpleStruct {
7 int md1;
8 };
10 static int sink;
12 static void examineValue(int x) { sink = x; }
14 int main(int argc, char *argv[]) {
15 auto ss = new SimpleStruct;
16 examineValue(ss->md1);
18 return 0;
21 // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value
22 // MISSED-NOT: use-of-uninitialized-value