1/* { dg-options "-fdump-tree-sanopt" } */
2/* { dg-do compile } */
3/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
4
5char e[5];
6
7extern struct S
8{
9  int a;
10  char b;
11} s;
12
13int
14foo  (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" } } */
23/* { dg-final { cleanup-tree-dump "sanopt" } } */
24