(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
asan/
no-redundant-instrumentation-13.c
       1  /* { dg-options "-fdump-tree-sanopt" } */
       2  /* { dg-do compile } */
       3  /* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
       4  
       5  void
       6  foo (char *p)
       7  {
       8    __builtin_memcpy (p, "abc", 0);
       9    /* This generates a __builtin___asan_report_store1 because we didn't access
      10       any byte in previous memcpy because of zero length parameter.  */
      11    p[0] = 'd';
      12  }
      13  
      14  /* { dg-final { scan-tree-dump-times "__builtin___asan_report_store1" 1 "sanopt" } } */