comparison gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-3.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 /* { dg-options "-fdump-tree-sanopt" } */
2 /* { dg-do compile } */
3 /* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
4
5 char
6 foo (__INT32_TYPE__ *p)
7 {
8 /* This generates a __builtin___asan_report_load1. */
9 __INT32_TYPE__ ret = *(char *) p;
10 /* This generates a __builtin___asan_report_store4 depending on the. */
11 *p = 26;
12 return ret;
13 }
14
15 /* { dg-final { scan-tree-dump-times "__builtin___asan_report" 2 "sanopt" } } */
16 /* { dg-final { scan-tree-dump-times "__builtin___asan_report_load1" 1 "sanopt" } } */
17 /* { dg-final { scan-tree-dump-times "__builtin___asan_report_store" 1 "sanopt" } } */