Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / msan / report-demangling.cpp
blob9799695ce95d59eaf101508ee6f73f678075743d
1 // Test that function name is mangled in the "created by an allocation" line,
2 // and demangled in the single-frame "stack trace" that follows.
4 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t && not %run %t >%t.out 2>&1
5 // RUN: FileCheck %s < %t.out && FileCheck %s < %t.out
7 __attribute__((noinline))
8 int f() {
9 int x;
10 int *volatile p = &x;
11 return *p;
14 int main(int argc, char **argv) {
15 return f();
16 // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value
17 // CHECK: Uninitialized value was created by an allocation of 'x' in the stack frame
18 // CHECK: #0 {{.*}} in f{{.*}} {{.*}}report-demangling.cpp:[[@LINE-9]]