diff mbox

PR libstdc++/81221 fix namespace qualification for parallel mode

Message ID 20170627161928.GY5211@redhat.com
State New
Headers show

Commit Message

Jonathan Wakely June 27, 2017, 4:19 p.m. UTC
On 27/06/17 15:46 +0100, Jonathan Wakely wrote:
>std::sample needs to call _GLIBCXX_STD_A::__sample instead of
>std::__sample, so that it works when Parallel Mode is active.
>
>	PR libstdc++/81221
>	* include/bits/stl_algo.h (sample): Qualify with _GLIBCXX_STD_A not
>	std.
>	* testsuite/25_algorithms/sample/81221.cc: New.
>
>Tested powerpc64le-linux, committed to trunk, and will commit to the
>gcc-7-branch shortly.

I forgot that tests can't use -D_GLIBCXX_PARALLEL if libgomp isn't
available. This makes it conditional on running "make check-parallel"

Commnitted to trunk.
diff mbox

Patch

commit 8fb437bed6c707288f8d1fa6c27c6e3ed6b422a4
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Jun 27 16:31:25 2017 +0100

    PR libstdc++/81221 only run new test for check-parallel
    
    	PR libstdc++/81221
    	* testsuite/25_algorithms/sample/81221.cc: Disable except for
    	check-parallel.

diff --git a/libstdc++-v3/testsuite/25_algorithms/sample/81221.cc b/libstdc++-v3/testsuite/25_algorithms/sample/81221.cc
index e6dd5e0..28ec0e3 100644
--- a/libstdc++-v3/testsuite/25_algorithms/sample/81221.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/sample/81221.cc
@@ -17,7 +17,6 @@ 
 
 // { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++1z } }
+// { dg-require-parallel-mode "" }
 
-#undef _GLIBCXX_PARALLEL
-#define _GLIBCXX_PARALLEL 1
 #include <algorithm>