From: Jonathan Wakely Date: Fri, 21 Aug 2020 11:01:05 +0000 (+0100) Subject: libstdc++: Skip PSTL tests when installed TBB is too old [PR 96718] X-Git-Tag: releases/gcc-10.3.0~1012 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=098a67ff74cca5f17ed630d870adf364c47031f6;p=thirdparty%2Fgcc.git 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. (cherry picked from commit 988fb2f597d67cdf3603654372c020c28448441f) --- 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 3e74f89bc411..88c5ea5b1d19 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 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 7693fe035485..4d75a1862116 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 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 2d991958e75c..f6f910204fe7 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 diff --git a/libstdc++-v3/testsuite/25_algorithms/pstl/feature_test.cc b/libstdc++-v3/testsuite/25_algorithms/pstl/feature_test.cc index c3a9be5e45a2..817bda3474e7 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