diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-1.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-1.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-1.c b/gcc-4.9/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-1.c index fa52e0ca8..028f8d715 100644 --- a/gcc-4.9/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-1.c +++ b/gcc-4.9/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-1.c @@ -2,7 +2,7 @@ location in the same basic block, the second reference should not be instrumented by the Address Sanitizer. */ -/* { dg-options "-fdump-tree-asan0" } */ +/* { dg-options "-fdump-tree-sanopt" } */ /* { dg-do compile } */ /* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */ @@ -16,12 +16,11 @@ test0 () tab[0] = 1; tab[1] = 2; - /* __builtin___asan_report_load1 called 1 time for the store - below. */ - char t0 = tab[1]; - /* This load should not be instrumented because it is to the same memory location as above. */ + char t0 = tab[1]; + + /* Likewise. */ char t1 = tab[1]; return t0 + t1; @@ -36,7 +35,7 @@ test1 (int i) the initialization. */ foo[i] = 1; - /*__builtin___asan_report_store1 called 2 times here to instrument + /*__builtin___asan_report_store_n called once here to instrument the store to the memory region of tab. */ __builtin_memset (tab, 3, sizeof (tab)); @@ -44,8 +43,8 @@ test1 (int i) __builtin_memset (tab, 4, sizeof (tab)); __builtin_memset (tab, 5, sizeof (tab)); - /* There are 2 calls to __builtin___asan_report_store1 and 2 calls - to __builtin___asan_report_load1 to instrument the store to + /* There is a call to __builtin___asan_report_store_n and a call + to __builtin___asan_report_load_n to instrument the store to (subset of) the memory region of tab. */ __builtin_memcpy (&tab[1], foo + i, 3); @@ -53,7 +52,7 @@ test1 (int i) the reference to tab[1] has been already instrumented above. */ return tab[1]; - /* So for these function, there should be 7 calls to + /* So for these functions, there should be 3 calls to __builtin___asan_report_store1. */ } @@ -63,6 +62,7 @@ main () return test0 () && test1 (0); } -/* { dg-final { scan-tree-dump-times "__builtin___asan_report_store1" 7 "asan0" } } */ -/* { dg-final { scan-tree-dump-times "__builtin___asan_report_load" 2 "asan0" } } */ -/* { dg-final { cleanup-tree-dump "asan0" } } */ +/* { dg-final { scan-tree-dump-times "__builtin___asan_report_store1" 3 "sanopt" } } */ +/* { dg-final { scan-tree-dump-times "__builtin___asan_report_store_n" 2 "sanopt" } } */ +/* { dg-final { scan-tree-dump-times "__builtin___asan_report_load" 1 "sanopt" } } */ +/* { dg-final { cleanup-tree-dump "sanopt" } } */ |