aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/asan/force-inline-opt0-1.c
blob: 0576155c284b3d00d12820976a46f00bdec017f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* This test checks that we are no instrumenting a memory access twice
   (before and after inlining) */

/* { dg-do compile } */
/* { dg-final { scan-assembler-not "__asan_report_load" } } */

__attribute__((always_inline))
inline void foo(int *x) {
  *x = 0;
}

int main() {
  int x;
  foo(&x);
  return x;
}