Hello. This should address failing test-case on Darwin. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
Ready to be installed? Martin gcc/testsuite/ChangeLog: 2017-10-10 Martin Liska <mli...@suse.cz> * c-c++-common/ubsan/ptr-overflow-sanitization-1.c: Scan optimized dump rather than assembly. --- gcc/testsuite/c-c++-common/ubsan/ptr-overflow-sanitization-1.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/gcc/testsuite/c-c++-common/ubsan/ptr-overflow-sanitization-1.c b/gcc/testsuite/c-c++-common/ubsan/ptr-overflow-sanitization-1.c index 42c14523764..b966d52a61d 100644 --- a/gcc/testsuite/c-c++-common/ubsan/ptr-overflow-sanitization-1.c +++ b/gcc/testsuite/c-c++-common/ubsan/ptr-overflow-sanitization-1.c @@ -1,5 +1,5 @@ /* { dg-require-effective-target lp64 } */ -/* { dg-options "-O -fsanitize=pointer-overflow" } */ +/* { dg-options "-O -fsanitize=pointer-overflow -fdump-tree-optimized" } */ /* { dg-skip-if "" { *-*-* } "-flto" } */ #define SMAX __PTRDIFF_MAX__ @@ -76,5 +76,4 @@ void negative_to_negative (char *ptr) p2 += 5; } - -/* { dg-final { scan-assembler-times "call\\s+__ubsan_handle_pointer_overflow" 17 } } */ +/* { dg-final { scan-tree-dump-times "__ubsan_handle_pointer_overflow" 17 "optimized" } } */