[PATCH] Don't run ident tests on powerpc-darwin

Iain Sandoe iain@sandoe.co.uk
Sun Dec 23 11:26:00 GMT 2018


Hi

The c-c++-common tests fail (or XPASS depending on which) on Darwin
because it doesn't currently emit .ident marker. 

For powerpc darwin (and, I think, AIX - hence copying David), there’s no
.ident support in the assembler, and we need to skip the tests.

In this case, I suggest that it’s not worth having a target-supports entry.
This is because what a target chooses to emit for -fident is controlled by
a target hook and therefore there’s no guarantee that a target-supports
that triggers off “ .ident” in the asm would be generically useful.

OTOH, if the testsuite maintainers prefer a support .. it can be done ;-)

OK for trunk?
Iain

gcc/testsuite/

	* c-c++-common/ident-0a.c: Skip for powerpc-darwin.
	* c-c++-common/ident-0b.c: Likewise.
	* c-c++-common/ident-1a.c: Likewise.
	* c-c++-common/ident-1b.c: Likewise.
	* c-c++-common/ident-2a.c: Likewise.
	* c-c++-common/ident-2b.c: Likewise.

diff --git a/gcc/testsuite/c-c++-common/ident-0a.c b/gcc/testsuite/c-c++-common/ident-0a.c
index 900d206bad..13bc6284de 100644
--- a/gcc/testsuite/c-c++-common/ident-0a.c
+++ b/gcc/testsuite/c-c++-common/ident-0a.c
@@ -1,6 +1,7 @@
 /* PR testsuite/52665
  * Make sure scan-assembler-not turns off .ident  */
 /* { dg-do compile } */
+/* { dg-skip-if "no assembler .ident support" { powerpc*-*-darwin* } } */
 int i;
 
 /* { dg-final { scan-assembler-not "GCC: " } } */
diff --git a/gcc/testsuite/c-c++-common/ident-0b.c b/gcc/testsuite/c-c++-common/ident-0b.c
index e08126d2d2..1184f8ff1c 100644
--- a/gcc/testsuite/c-c++-common/ident-0b.c
+++ b/gcc/testsuite/c-c++-common/ident-0b.c
@@ -2,6 +2,7 @@
  * Make sure scan-assembler-not turns off .ident unless -fident in testcase */
 /* { dg-do compile } */
 /* { dg-options "-fident" } */
+/* { dg-skip-if "no assembler .ident support" { powerpc*-*-darwin* } } */
 int i;
 
 /* { dg-final { scan-assembler-not "GCC: " { xfail *-*-* } } } */
diff --git a/gcc/testsuite/c-c++-common/ident-1a.c b/gcc/testsuite/c-c++-common/ident-1a.c
index 867ee43fb2..b6003735ce 100644
--- a/gcc/testsuite/c-c++-common/ident-1a.c
+++ b/gcc/testsuite/c-c++-common/ident-1a.c
@@ -1,6 +1,7 @@
 /* PR testsuite/52665
  * Make sure scan-assembler turns off .ident  */
 /* { dg-do compile } */
+/* { dg-skip-if "no assembler .ident support" { powerpc*-*-darwin* } } */
 int i;
 
 /* { dg-final { scan-assembler "GCC: " { xfail *-*-* } } } */
diff --git a/gcc/testsuite/c-c++-common/ident-1b.c b/gcc/testsuite/c-c++-common/ident-1b.c
index 2431086d24..b0d88983f3 100644
--- a/gcc/testsuite/c-c++-common/ident-1b.c
+++ b/gcc/testsuite/c-c++-common/ident-1b.c
@@ -2,6 +2,7 @@
  * Make sure scan-assembler turns off .ident unless -fident in testcase */
 /* { dg-do compile } */
 /* { dg-options "-fident" } */
+/* { dg-skip-if "no assembler .ident support" { powerpc*-*-darwin* } } */
 int i;
 
 /* { dg-final { scan-assembler "GCC: " } } */
diff --git a/gcc/testsuite/c-c++-common/ident-2a.c b/gcc/testsuite/c-c++-common/ident-2a.c
index 131b867628..e9321c7292 100644
--- a/gcc/testsuite/c-c++-common/ident-2a.c
+++ b/gcc/testsuite/c-c++-common/ident-2a.c
@@ -1,6 +1,7 @@
 /* PR testsuite/52665
  * Make sure scan-assembler-times turns off .ident  */
 /* { dg-do compile } */
+/* { dg-skip-if "no assembler .ident support" { powerpc*-*-darwin* } } */
 int i;
 
 /* { dg-final { scan-assembler-times "GCC: " 0 } } */ /* internal test, keep -times 0 ! */
diff --git a/gcc/testsuite/c-c++-common/ident-2b.c b/gcc/testsuite/c-c++-common/ident-2b.c
index a21e25fcce..e057fac747 100644
--- a/gcc/testsuite/c-c++-common/ident-2b.c
+++ b/gcc/testsuite/c-c++-common/ident-2b.c
@@ -2,6 +2,7 @@
  * Make sure scan-assembler-times turns off .ident unless -fident in testcase */
 /* { dg-do compile } */
 /* { dg-options "-fident" } */
+/* { dg-skip-if "no assembler .ident support" { powerpc*-*-darwin* } } */
 int ident;
 
 /* { dg-final { scan-assembler-times "GCC: " 1 } } */
-- 
2.17.1




More information about the Gcc-patches mailing list