[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / compiler-rt / test / msan / no_sanitize_memory_prop.cpp
blobbfd4194dd266beaa9c6a9c27c22466ed37b9f840
1 // RUN: %clangxx_msan -O0 %s -o %t && %run %t >%t.out 2>&1
2 // RUN: %clangxx_msan -O1 %s -o %t && %run %t >%t.out 2>&1
3 // RUN: %clangxx_msan -O2 %s -o %t && %run %t >%t.out 2>&1
4 // RUN: %clangxx_msan -O3 %s -o %t && %run %t >%t.out 2>&1
6 // Test that (no_sanitize_memory) functions DO NOT propagate shadow.
8 #include <stdlib.h>
9 #include <stdio.h>
11 __attribute__((noinline))
12 __attribute__((no_sanitize_memory))
13 int f(int x) {
14 return x;
17 int main(void) {
18 int x;
19 int * volatile p = &x;
20 int y = f(*p);
21 if (y)
22 exit(0);
23 return 0;