This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR libstdc++/81221 fix namespace qualification for parallel mode
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Tue, 27 Jun 2017 17:19:28 +0100
- Subject: Re: [PATCH] PR libstdc++/81221 fix namespace qualification for parallel mode
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jwakely at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 9EED4AB97A
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9EED4AB97A
- References: <20170627144604.GA12842@redhat.com>
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.
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>