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