gcc/testsuite/c-c++-common/asan/aggressive-opts.c
raw| 1 | /* { dg-options "-fdump-tree-asan" } */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-skip-if "" { *-*-* } { "*" } { "-O3" } } */ |
| 4 | |
| 5 | int ext; |
| 6 | |
| 7 | int |
| 8 | Perl_do_sv_dump() |
| 9 | { |
| 10 | int freq[10]; |
| 11 | int i; |
| 12 | int max = 0; |
| 13 | |
| 14 | if (max < ext) |
| 15 | max = ext; |
| 16 | |
| 17 | for (i = 0; i <= max; i++) |
| 18 | if (freq[i]) |
| 19 | ext = 0; |
| 20 | |
| 21 | if (i > 20) |
| 22 | return freq[i]; |
| 23 | else |
| 24 | return 0; |
| 25 | } |
| 26 | |
| 27 | /* { dg-final { scan-tree-dump-times "ASAN_CHECK" 2 "asan1" } } */ |