https://gcc.gnu.org/g:1f5d5c28a245886caa19a61a65d85cb4a2139123
commit r15-11187-g1f5d5c28a245886caa19a61a65d85cb4a2139123 Author: Jonathan Wakely <[email protected]> Date: Sun May 17 19:27:11 2026 +0100 libstdc++: Reduce iterations in PSTL test for Debug Mode This test often times out, especially on machines with a large number of cores when the tests are run with a lot of parallel jobs. I suspect that TBB creates a lot of threads due to std::hardware_concurrency() being a large number, but because most cores are already busy running other tests (due to `make -jN check` with large N) the system gets oversubscribed. In Debug Mode, the testcase runs much slower, and often times out. It's probably fine to just test with fewer iterations when Debug Mode is active. libstdc++-v3/ChangeLog: * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: Reduce iterations for debug mode. (cherry picked from commit 6df1f865272fc95f386f5448f3a74486451bb58c) Diff: --- .../testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libstdc++-v3/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc b/libstdc++-v3/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc index e4bd435d1926..51bdeaa96a13 100644 --- a/libstdc++-v3/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc +++ b/libstdc++-v3/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc @@ -189,7 +189,11 @@ int main() { using TestUtils::float64_t; +#ifndef _GLIBCXX_DEBUG const std::size_t N = 100000; +#else + const std::size_t N = 10000; +#endif for (std::size_t n = 0; n < N; n = n < 16 ? n + 1 : size_t(3.14159 * n)) {
