1 // This test checks that we are no instrumenting a memory access twice
2 // (before and after inlining)
3 // RUN: %clangxx_asan -O1 %s -o %t && %run %t
4 // RUN: %clangxx_asan -O0 %s -o %t && %run %t
5 __attribute__((always_inline))
foo(int * x)6 void foo(int *x) {
7   *x = 0;
8 }
9 
main()10 int main() {
11   int x;
12   foo(&x);
13   return x;
14 }
15