From: Iain Sandoe Date: Sun, 4 Aug 2019 12:37:28 +0000 (+0000) Subject: Darwin, PPC, testsuite, backport fix for pr71785. X-Git-Tag: releases/gcc-9.2.0~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04f5aea46f3d2a6910732934230160bcf9aac77e;p=thirdparty%2Fgcc.git Darwin, PPC, testsuite, backport fix for pr71785. Firstly, we adjust the test conditions to use non-PIC code for Darwin. Secondly, we have to account for out-of-line GPR restores which gives a false positive on one of the scan-assembler-not. Lastly, we make the test a bit more specific for Darwin - that it looks for absence of branches to local labels. 2019-08-04 Iain Sandoe Backport from mainline. 2019-06-23 Iain Sandoe * gcc.target/powerpc/pr71785.c: For Darwin, make test non-PIC, expect the out-of-line GPR restore, and test specifically for absence of branches to local labels. From-SVN: r274082 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d5d30c9e224a..4ff8851f56a8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2019-08-04 Iain Sandoe + + Backport from mainline. + 2019-06-23 Iain Sandoe + + * gcc.target/powerpc/pr71785.c: For Darwin, make test non-PIC, + expect the out-of-line GPR restore, and test specifically for + absence of branches to local labels. + 2019-08-04 Iain Sandoe Backport from mainline. diff --git a/gcc/testsuite/gcc.target/powerpc/pr71785.c b/gcc/testsuite/gcc.target/powerpc/pr71785.c index 613dcd1a937f..c667ad81aa29 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr71785.c +++ b/gcc/testsuite/gcc.target/powerpc/pr71785.c @@ -1,6 +1,11 @@ /* { dg-do compile { target { powerpc*-*-* } } } */ /* { dg-options "-O2" } */ -/* { dg-final { scan-assembler-not {\mb\M} } } */ +/* We have to lose the default pic codegen on Darwin. */ +/* { dg-additional-options "-mdynamic-no-pic" { target powerpc*-*-darwin* } } */ +/* ... and account for the out-of-line GPR restore. */ +/* { dg-final { scan-assembler-times {\mb[ \t]*restGPR} 1 { target powerpc*-*-darwin* } } } */ +/* { dg-final { scan-assembler-not {\mb[ \t]L} { target powerpc*-*-darwin* } } } */ +/* { dg-final { scan-assembler-not {\mb\M} { target { ! powerpc*-*-darwin* } } } } */ /* Check that all computed gotos in this testcase end up unfactored completely. If some is not there will be a unconditional jump left; if all works fine,