Debian Codegraph @

gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-15.c

raw
1 /* { dg-options "-fdump-tree-sanopt" } */
2 /* { dg-do compile } */
3 /* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */
4
5 void
6 foo (char *p)
7 {
8 volatile int two = 2;
9 __builtin_memcpy (p, "abc", two);
10 /* This generates a __builtin___asan_report_store1 because we don't
11 optimize previous memcpy call. */
12 p[0] = 'd';
13 }
14
15 /* { dg-final { scan-tree-dump-times "__builtin___asan_report_store1" 1 "sanopt" } } */