analyzer: enable taint state machine by default [PR103533]
[official-gcc.git] / gcc / testsuite / c-c++-common / asan / no-redundant-instrumentation-12.c
blobcf216be4e019a5883e22a5e96d014aa29acee7a4
1 /* { dg-options "-fdump-tree-sanopt" } */
2 /* { dg-do compile } */
3 /* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */
5 void
6 foo (char *p)
8 volatile int zero = 0;
9 __builtin_memcpy (p, "abc", zero);
10 /* This generates a __builtin___asan_report_store1 because we pass volatile
11 zero length into memcpy. */
12 p[0] = 'd';
15 /* { dg-final { scan-tree-dump-times "__builtin___asan_report_store1" 1 "sanopt" } } */