On Thu, Feb 4, 2016 at 12:56 PM, Uros Bizjak <ubiz...@gmail.com> wrote: > On Thu, Feb 4, 2016 at 12:12 PM, Andreas Schwab <sch...@suse.de> wrote: >> Uros Bizjak <ubiz...@gmail.com> writes: >> >>> On Wed, Feb 3, 2016 at 2:59 PM, Jakub Jelinek <ja...@redhat.com> wrote: >>>> On Wed, Feb 03, 2016 at 02:53:56PM +0100, Uros Bizjak wrote: >>>>> diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp >>>>> index 994160e..a1198c0 100644 >>>>> --- a/gcc/testsuite/lib/asan-dg.exp >>>>> +++ b/gcc/testsuite/lib/asan-dg.exp >>>>> @@ -20,7 +20,7 @@ >>>>> proc check_effective_target_fsanitize_address {} { >>>>> return [check_no_compiler_messages fsanitize_address executable { >>>>> int main (void) { return 0; } >>>>> - } "-fsanitize=address"] >>>>> + }] >>>>> } >>>>> >>>> >>>> This is just weird. What if fsanitize_address effective target is used >>>> outside of asan/ (i.e. without asan_init first) ? >>> >>> It won't work, you also need various link flags that are part of >>> TEST_ALWAYS_FLAGS. >> >> That breaks gcc.dg/sancov/asan.c. >> >> Running /usr/local/gcc/gcc-20160204/gcc/testsuite/gcc.dg/sancov/sancov.exp >> ... >> Executing on host: /usr/local/gcc/gcc-20160204/Build/gcc/xgcc >> -B/usr/local/gcc/gcc-20160204/Build/gcc/ fsanitize_address14637.c >> -fno-diagnostics-show-caret -fdiagnostics-color=never -lm -o >> fsanitize_address14637.exe (timeout = 300) >> spawn -ignore SIGHUP /usr/local/gcc/gcc-20160204/Build/gcc/xgcc >> -B/usr/local/gcc/gcc-20160204/Build/gcc/ fsanitize_address14637.c >> -fno-diagnostics-show-caret -fdiagnostics-color=never -lm -o >> fsanitize_address14637.exe. >> Executing on host: /usr/local/gcc/gcc-20160204/Build/gcc/xgcc >> -B/usr/local/gcc/gcc-20160204/Build/gcc/ >> /usr/local/gcc/gcc-20160204/gcc/testsuite/gcc.dg/sancov/asan.c >> -fno-diagnostics-show-caret -fdiagnostics-color=never -O0 >> -fsanitize-coverage=trace-pc -fsanitize=address -fdump-tree-optimized -S -o >> asan.s (timeout = 300) >> spawn -ignore SIGHUP /usr/local/gcc/gcc-20160204/Build/gcc/xgcc >> -B/usr/local/gcc/gcc-20160204/Build/gcc/ >> /usr/local/gcc/gcc-20160204/gcc/testsuite/gcc.dg/sancov/asan.c >> -fno-diagnostics-show-caret -fdiagnostics-color=never -O0 >> -fsanitize-coverage=trace-pc -fsanitize=address -fdump-tree-optimized -S -o >> asan.s. >> cc1: warning: -fsanitize=address and -fsanitize=kernel-address are not >> supported for this target. >> cc1: warning: -fsanitize=address not supported for this target. >> output is: >> cc1: warning: -fsanitize=address and -fsanitize=kernel-address are not >> supported for this target. >> cc1: warning: -fsanitize=address not supported for this target. >> >> FAIL: gcc.dg/sancov/asan.c -O0 (test for excess errors) >> Excess errors: >> cc1: warning: -fsanitize=address and -fsanitize=kernel-address are not >> supported for this target >> cc1: warning: -fsanitize=address not supported for this target >> >> FAIL: gcc.dg/sancov/asan.c -O0 scan-tree-dump-times optimized >> "__builtin___sanitizer_cov_trace_pc \\(\\)" 4 >> FAIL: gcc.dg/sancov/asan.c -O0 scan-tree-dump-times optimized >> "__builtin___asan_report_load4 \\(" 1 >> FAIL: gcc.dg/sancov/asan.c -O0 scan-tree-dump-times optimized >> "__builtin___asan_report_store4 \\(" 1 > > Eh, speaking about sanitizer testsuite weirdness... > > Anyway, I'll revert asan-dg.change.
OTOH, does this testcase even gets a chance to run? fsanitize_address check builds an executable, so without proper library paths the test fails. IMO, we have to move this test to gcc.dg/asan directory. Uros.