Home | History | Annotate | Download | only in TestCases
      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))
      6 void foo(int *x) {
      7   *x = 0;
      8 }
      9 
     10 int main() {
     11   int x;
     12   foo(&x);
     13   return x;
     14 }
     15