Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-13.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 /* { dg-options "-fdump-tree-sanopt" } */ |
2 /* { dg-do compile } */ | |
3 /* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */ | |
4 | |
5 void | |
6 foo (char *p) | |
7 { | |
8 __builtin_memcpy (p, "abc", 0); | |
9 /* This generates a __builtin___asan_report_store1 because we didn't access | |
10 any byte in previous memcpy because of zero length parameter. */ | |
11 p[0] = 'd'; | |
12 } | |
13 | |
14 /* { dg-final { scan-tree-dump-times "__builtin___asan_report_store1" 1 "sanopt" } } */ |