(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
asan/
no-redundant-instrumentation-7.c
       1  /* { dg-options "-fdump-tree-sanopt" } */
       2  /* { dg-do compile } */
       3  /* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
       4  
       5  char e[5];
       6  
       7  extern struct S
       8  {
       9    int a;
      10    char b;
      11  } s;
      12  
      13  int
      14  foo  (int *a, char *b, char *c)
      15  {
      16    int d = __builtin_memcmp (&s.a, e, 4);
      17    /* No check because s.a was instrumented above with access size 4.  */
      18    return s.a;
      19  }
      20  
      21  /* { dg-final { scan-tree-dump-not "& 7" "sanopt" } } */
      22  /* { dg-final { scan-tree-dump-not "__builtin___asan_report_load4" "sanopt" } } */