| 1 |
/* { dg-options "-fdump-tree-sanopt" } */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */ |
| 4 |
|
| 5 |
extern __UINT32_TYPE__ a; |
| 6 |
|
| 7 |
void |
| 8 |
foo () |
| 9 |
{ |
| 10 |
/* Instrument a with access size 3. */ |
| 11 |
int d = __builtin_memcmp (&a, "123", 3); |
| 12 |
/* This should generate a __builtin___asan_report_store4, because |
| 13 |
the reference to a has been instrumented above with access size 3. */ |
| 14 |
a = 1; |
| 15 |
} |
| 16 |
|
| 17 |
/* { dg-final { scan-tree-dump-times "__builtin___asan_report_store4" 1 "sanopt" } } */ |