1// RUN: %clangxx_msan -O3 %s -o %t && %run %t
2
3// Test that no_sanitize_memory attribute applies even when the function would
4// be normally inlined.
5
6#include <stdlib.h>
7
8__attribute__((no_sanitize_memory))
9int f(int *p) {
10  if (*p) // BOOOM?? Nope!
11    exit(0);
12  return 0;
13}
14
15int main(int argc, char **argv) {
16  int x;
17  int * volatile p = &x;
18  int res = f(p);
19  return 0;
20}
21