comparison gcc/testsuite/c-c++-common/asan/force-inline-opt0-1.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
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-options "-fno-sanitize-address-use-after-scope" } */
6 /* { dg-final { scan-assembler-not "__asan_report_load" } } */
7
8 __attribute__((always_inline))
9 inline void foo(int *x) {
10 *x = 0;
11 }
12
13 int main() {
14 int x;
15 foo(&x);
16 return x;
17 }