This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH,testsuite, Darwin] Skip tests with pthread_barrier.


Hi,

Darwin is stated to be SUSv6 compliant and, at that revision, pthread_barrier is optional.
It is not implemented on any version at least up to Darwin18.

This skips the tests currently attempted which use pthread_barrier.

OK for trunk?

thanks
Iain

gcc/testsuite/
	* c-c++-common/asan/pointer-subtract-3.c: Skip for Darwin.
	* c-c++-common/asan/pointer-subtract-4.c: Likewise.
	* g++.dg/torture/pr44295.C : Likewise.

---
 gcc/testsuite/c-c++-common/asan/pointer-subtract-3.c | 1 +
 gcc/testsuite/c-c++-common/asan/pointer-subtract-4.c | 1 +
 gcc/testsuite/g++.dg/torture/pr44295.C               | 1 +
 3 files changed, 3 insertions(+)

diff --git a/gcc/testsuite/c-c++-common/asan/pointer-subtract-3.c b/gcc/testsuite/c-c++-common/asan/pointer-subtract-3.c
index 7cae91b699..b434aaac09 100644
--- a/gcc/testsuite/c-c++-common/asan/pointer-subtract-3.c
+++ b/gcc/testsuite/c-c++-common/asan/pointer-subtract-3.c
@@ -1,4 +1,5 @@
 /* { dg-do run { target pthread_h } } */
+/* { dg-skip-if "no pthread_barrier" { *-*-darwin* } } */
 /* { dg-set-target-env-var ASAN_OPTIONS "detect_invalid_pointer_pairs=2:halt_on_error=1" } */
 /* { dg-options "-fsanitize=address,pointer-subtract" } */
 /* { dg-additional-options "-pthread" { target pthread } } */
diff --git a/gcc/testsuite/c-c++-common/asan/pointer-subtract-4.c b/gcc/testsuite/c-c++-common/asan/pointer-subtract-4.c
index af65c59512..4931c2147e 100644
--- a/gcc/testsuite/c-c++-common/asan/pointer-subtract-4.c
+++ b/gcc/testsuite/c-c++-common/asan/pointer-subtract-4.c
@@ -1,4 +1,5 @@
 /* { dg-do run { target pthread_h } } */
+/* { dg-skip-if "no pthread_barrier" { *-*-darwin* } } */
 /* { dg-shouldfail "asan" } */
 /* { dg-set-target-env-var ASAN_OPTIONS "detect_invalid_pointer_pairs=2:halt_on_error=1" } */
 /* { dg-options "-fsanitize=address,pointer-subtract" } */
diff --git a/gcc/testsuite/g++.dg/torture/pr44295.C b/gcc/testsuite/g++.dg/torture/pr44295.C
index 7525dc41a7..a2edf63cd0 100644
--- a/gcc/testsuite/g++.dg/torture/pr44295.C
+++ b/gcc/testsuite/g++.dg/torture/pr44295.C
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-additional-options "-Wno-return-type" } */
+/* { dg-skip-if "no pthread_barrier" { *-*-darwin* } } */
 
 extern "C" {
   typedef __SIZE_TYPE__ size_t;
-- 
2.17.1



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]