aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2012-09-18 14:02:20 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2012-09-18 14:02:20 +0000
commitecfce0b850ae17455c559493c027599df251699a (patch)
treeaf1cccb697d753bdc1ea93c92358e957af1cf65a
parent1d61ee4252f7b906b37bb284e3b4616ebe61eaf6 (diff)
downloadgcc-ecfce0b850ae17455c559493c027599df251699a.zip
gcc-ecfce0b850ae17455c559493c027599df251699a.tar.gz
gcc-ecfce0b850ae17455c559493c027599df251699a.tar.bz2
re PR libstdc++/54612 (Many failures in ext/random testsuite)
2012-09-18 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/54612 * include/ext/random.tcc (operator== (const __gnu_cxx::simd_fast_mersenne_twister_engine<>&, const __gnu_cxx::simd_fast_mersenne_twister_engine<>&)): Fix state_size use. * config/cpu/i486/opt/ext/opt_random.h: Guard with __SSE2__. From-SVN: r191424
-rw-r--r--libstdc++-v3/ChangeLog9
-rw-r--r--libstdc++-v3/config/cpu/i486/opt/ext/opt_random.h2
-rw-r--r--libstdc++-v3/include/ext/random.tcc7
3 files changed, 17 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index f56df9a..a687a48 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,12 @@
+2012-09-18 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/54612
+ * include/ext/random.tcc (operator==
+ (const __gnu_cxx::simd_fast_mersenne_twister_engine<>&,
+ const __gnu_cxx::simd_fast_mersenne_twister_engine<>&)): Fix
+ state_size use.
+ * config/cpu/i486/opt/ext/opt_random.h: Guard with __SSE2__.
+
2012-09-17 Ulrich Drepper <drepper@gmail.com>
* configure.ac: Substitute CPU_OPT_EXT_RANDOM.
diff --git a/libstdc++-v3/config/cpu/i486/opt/ext/opt_random.h b/libstdc++-v3/config/cpu/i486/opt/ext/opt_random.h
index cd06f3f..968b1c1 100644
--- a/libstdc++-v3/config/cpu/i486/opt/ext/opt_random.h
+++ b/libstdc++-v3/config/cpu/i486/opt/ext/opt_random.h
@@ -32,6 +32,7 @@
#pragma GCC system_header
+#ifdef __SSE2__
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
{
@@ -130,5 +131,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
+#endif // __SSE2__
#endif // _EXT_OPT_RANDOM_H
diff --git a/libstdc++-v3/include/ext/random.tcc b/libstdc++-v3/include/ext/random.tcc
index eca8772..0700137 100644
--- a/libstdc++-v3/include/ext/random.tcc
+++ b/libstdc++-v3/include/ext/random.tcc
@@ -328,7 +328,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__msk1, __msk2, __msk3, __msk4,
__parity1, __parity2, __parity3, __parity4>& __rhs)
{
- return (std::equal(__lhs._M_stateT, __lhs._M_stateT + state_size,
+ typedef __gnu_cxx::simd_fast_mersenne_twister_engine<_UIntType,
+ __m, __pos1, __sl1, __sl2, __sr1, __sr2,
+ __msk1, __msk2, __msk3, __msk4,
+ __parity1, __parity2, __parity3, __parity4> __engine;
+ return (std::equal(__lhs._M_stateT,
+ __lhs._M_stateT + __engine::state_size,
__rhs._M_stateT)
&& __lhs._M_pos == __rhs._M_pos);
}