Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / testsuite / c-c++-common / asan / force-inline-opt0-1.c
1 /* This test checks that we are no instrumenting a memory access twice
2    (before and after inlining) */
3
4 /* { dg-do compile } */
5 /* { dg-final { scan-assembler-not "__asan_report_load" } } */
6
7 __attribute__((always_inline))
8 inline void foo(int *x) {
9   *x = 0;
10 }
11
12 int main() {
13   int x;
14   foo(&x);
15   return x;
16 }