diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/asan/force-inline-opt0-1.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/c-c++-common/asan/force-inline-opt0-1.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/asan/force-inline-opt0-1.c b/gcc-4.9/gcc/testsuite/c-c++-common/asan/force-inline-opt0-1.c new file mode 100644 index 000000000..0576155c2 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/c-c++-common/asan/force-inline-opt0-1.c @@ -0,0 +1,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; +} |