diff options
author | Andrea Ornstein <andrea.ornstein@st.com> | 2009-04-20 15:54:16 +0000 |
---|---|---|
committer | Andrea Ornstein <andrea.ornstein@st.com> | 2009-04-20 15:54:16 +0000 |
commit | 28e559d03d6abd0c7f19b9301d8e05e8d60c5fe2 (patch) | |
tree | 9741dd1fced71957a68fe436062558d2b9906c2d /libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm_mixed2.cc | |
parent | b49c1e36b5f0ba5db72be07b6427a3a57573229d (diff) |
merge from trunk revisions 127002-132392, 3/N
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/st/cli-be@146434 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm_mixed2.cc')
-rw-r--r-- | libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm_mixed2.cc | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm_mixed2.cc b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm_mixed2.cc new file mode 100644 index 00000000000..94794d46c9f --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm_mixed2.cc @@ -0,0 +1,42 @@ +// { dg-do compile } +// { dg-require-parallel-mode "" } +// { dg-options "-fopenmp" { target *-*-* } } + +// Copyright (C) 2007 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// Make sure to test without _GLIBCXX_PARALLEL +#ifdef _GLIBCXX_PARALLEL +# undef _GLIBCXX_PARALLEL +#endif + +#include <parallel/algorithm> +#include <vector> +#include <algorithm> + +void test() +{ + typedef unsigned short value_type; + typedef std::vector<value_type> vector_type; + + const value_type c(0); + + vector_type v(10); + std::find(v.begin(), v.end(), c); + __gnu_parallel::find(v.begin(), v.end(), c); +} |