PR c++/85662
[official-gcc.git] / gcc / testsuite / c-c++-common / asan / no-redundant-instrumentation-14.c
blob0750f1b6cfd9e4ef49adc68912b55ab43499d6ee
1 /* { dg-options "-fdump-tree-sanopt" } */
2 /* { dg-do compile } */
3 /* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
5 void
6 foo (char *p)
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';
14 /* { dg-final { scan-tree-dump-not "__builtin___asan_report_store1" "sanopt" } } */