diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index aaa6b8b484e..b84a590987f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2012-12-04 Jakub Jelinek + + PR testsuite/55587 + * lib/asan-dg.exp (asan_init): Return 1 if libasan has been found, + 0 if not. + * g++.dg/asan/asan.exp: Don't run gcc-dg-runtest if [asan_init] + returned 0. + * gcc.dg/asan/asan.exp: Likewise. + 2012-12-04 Richard Biener PR tree-optimization/55124 diff --git a/gcc/testsuite/g++.dg/asan/asan.exp b/gcc/testsuite/g++.dg/asan/asan.exp index ec9b0c418f8..59725036489 100644 --- a/gcc/testsuite/g++.dg/asan/asan.exp +++ b/gcc/testsuite/g++.dg/asan/asan.exp @@ -26,11 +26,13 @@ if ![check_effective_target_faddress_sanitizer] { # Initialize `dg'. dg-init -asan_init +if [asan_init] { # Main loop. gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C $srcdir/c-c++-common/asan/*.c]] "" +} + # All done. asan_finish dg-finish diff --git a/gcc/testsuite/gcc.dg/asan/asan.exp b/gcc/testsuite/gcc.dg/asan/asan.exp index f1b8d0c40fe..ef1c6e37331 100644 --- a/gcc/testsuite/gcc.dg/asan/asan.exp +++ b/gcc/testsuite/gcc.dg/asan/asan.exp @@ -28,11 +28,13 @@ if ![check_effective_target_faddress_sanitizer] { # Initialize `dg'. dg-init -asan_init +if [asan_init] { # Main loop. gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/c-c++-common/asan/*.c]] "" +} + # All done. asan_finish dg-finish diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp index 925f19463a7..90ff3572787 100644 --- a/gcc/testsuite/lib/asan-dg.exp +++ b/gcc/testsuite/lib/asan-dg.exp @@ -91,6 +91,10 @@ proc asan_init { args } { set TEST_ALWAYS_FLAGS "$link_flags -fsanitize=address -g" } } + if { $link_flags != "" } { + return 1 + } + return 0 } #