1 /* { dg-options "-fdump-tree-sanopt" } */
2 /* { dg-do compile } */
3 /* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
14 foo (int *a
, char *b
, char *c
)
16 /* 2 checks for s.a, 2 checks for e. */
17 int d
= __builtin_memcmp (s
.a
, e
, 100);
18 /* One check for s.a and one check for e. */
19 d
+= __builtin_memcmp (s
.a
, e
, 200);
20 /* For a total of 6 checks. */
24 /* { dg-final { scan-tree-dump-times "& 7" 6 "sanopt" } } */
25 /* { dg-final { scan-tree-dump-times "__builtin___asan_report_load_n" 4 "sanopt" } } */
26 /* { dg-final { scan-tree-dump-not "__builtin___asan_report_store" "sanopt" } } */
27 /* { dg-final { cleanup-tree-dump "sanopt" } } */