1 /* { dg-options "-fdump-tree-sanopt" } */ 2 /* { dg-do compile } */ 3 /* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */ 4 5 void foo(char * p)6foo (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" } } */ 16