I normally build with --disable-libsanitizer, because the sanitizers testresults are very unreproducable, so just annoying noise. This however makes most (all?) ubsan testcases fail, since they want to load a shared library that does not exist.
This patch disables the ubsan testcases if a trivial program does not run when compiled with ubsan. Tested on powerpc64-linux, -m32,-m32/-mpowerpc64,-m64,-m64/-mlra; 5452 failures gone, no other changes. Okay for mainline? Segher 2014-12-24 Segher Boessenkool <seg...@kernel.crashing.org> gcc/testsuite/ * lib/ubsan-dg.exp (check_effective_target_fsanitize_undefined): Check if testcases run without errors, not just if they compile. --- gcc/testsuite/lib/ubsan-dg.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/lib/ubsan-dg.exp b/gcc/testsuite/lib/ubsan-dg.exp index 3bfdcc8..cea3e0e 100644 --- a/gcc/testsuite/lib/ubsan-dg.exp +++ b/gcc/testsuite/lib/ubsan-dg.exp @@ -18,7 +18,7 @@ # code, 0 otherwise. proc check_effective_target_fsanitize_undefined {} { - return [check_no_compiler_messages fsanitize_undefined executable { + return [check_runtime fsanitize_undefined { int main (void) { return 0; } } "-fsanitize=undefined"] } -- 1.8.1.4