aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2020-08-21 12:01:05 +0100
committerJonathan Wakely <jwakely@redhat.com>2020-08-21 12:01:05 +0100
commit988fb2f597d67cdf3603654372c020c28448441f (patch)
treebe816f778ed74374621b3d5d2245454430aadbcf
parent388cb292a94f98a276548cd6ce01285cf36d17df (diff)
downloadgcc-988fb2f597d67cdf3603654372c020c28448441f.zip
gcc-988fb2f597d67cdf3603654372c020c28448441f.tar.gz
gcc-988fb2f597d67cdf3603654372c020c28448441f.tar.bz2
libstdc++: Skip PSTL tests when installed TBB is too old [PR 96718]
These tests do not actually require TBB, because they only inspect the feature test macros present in the headers. However, if TBB is installed then its headers will be included, and the version will be checked. If the version is too old, compilation fails due to a #error directive. This change disables the tests if TBB is not present, so that we skip them instead of failing. libstdc++-v3/ChangeLog: PR libstdc++/96718 * testsuite/25_algorithms/pstl/feature_test-2.cc: Require tbb-backend effective target. * testsuite/25_algorithms/pstl/feature_test-3.cc: Likewise. * testsuite/25_algorithms/pstl/feature_test-5.cc: Likewise. * testsuite/25_algorithms/pstl/feature_test.cc: Likewise.
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/pstl/feature_test-2.cc1
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/pstl/feature_test-3.cc1
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/pstl/feature_test-5.cc1
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/pstl/feature_test.cc1
4 files changed, 4 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/25_algorithms/pstl/feature_test-2.cc b/libstdc++-v3/testsuite/25_algorithms/pstl/feature_test-2.cc
index 3e74f89..88c5ea5 100644
--- a/libstdc++-v3/testsuite/25_algorithms/pstl/feature_test-2.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/pstl/feature_test-2.cc
@@ -17,6 +17,7 @@
// { dg-options "-std=gnu++17" }
// { dg-do preprocess { target c++17 } }
+// { dg-require-effective-target tbb-backend }
#include <numeric>
diff --git a/libstdc++-v3/testsuite/25_algorithms/pstl/feature_test-3.cc b/libstdc++-v3/testsuite/25_algorithms/pstl/feature_test-3.cc
index 7693fe0..4d75a18 100644
--- a/libstdc++-v3/testsuite/25_algorithms/pstl/feature_test-3.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/pstl/feature_test-3.cc
@@ -17,6 +17,7 @@
// { dg-options "-std=gnu++17" }
// { dg-do preprocess { target c++17 } }
+// { dg-require-effective-target tbb-backend }
#include <execution>
diff --git a/libstdc++-v3/testsuite/25_algorithms/pstl/feature_test-5.cc b/libstdc++-v3/testsuite/25_algorithms/pstl/feature_test-5.cc
index 2d99195..f6f9102 100644
--- a/libstdc++-v3/testsuite/25_algorithms/pstl/feature_test-5.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/pstl/feature_test-5.cc
@@ -17,6 +17,7 @@
// { dg-options "-std=gnu++17" }
// { dg-do preprocess { target c++17 } }
+// { dg-require-effective-target tbb-backend }
#include <memory>
diff --git a/libstdc++-v3/testsuite/25_algorithms/pstl/feature_test.cc b/libstdc++-v3/testsuite/25_algorithms/pstl/feature_test.cc
index c3a9be5..817bda3 100644
--- a/libstdc++-v3/testsuite/25_algorithms/pstl/feature_test.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/pstl/feature_test.cc
@@ -17,6 +17,7 @@
// { dg-options "-std=gnu++17" }
// { dg-do preprocess { target c++17 } }
+// { dg-require-effective-target tbb-backend }
#include <algorithm>