1 /* { dg-options "-fdump-tree-sanopt" } */
2 /* { dg-do compile } */
3 /* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
4 
5 void
foo(char * p)6 foo (char *p)
7 {
8   __builtin_memcpy (p, "abc", 2);
9   /* This doesn't generate a __builtin___asan_report_store1 because we
10      verified p[0] through p[2] is writable in previous memcpy call.  */
11   p[0] = 'd';
12 }
13 
14 /* { dg-final { scan-tree-dump-not "__builtin___asan_report_store1" "sanopt" } } */
15