public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [v3] libstdc++/50509
@ 2011-09-24 21:30 Paolo Carlini
  0 siblings, 0 replies; only message in thread
From: Paolo Carlini @ 2011-09-24 21:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: libstdc++

[-- Attachment #1: Type: text/plain, Size: 72 bytes --]

Hi,

committed mainline and 4_6-branch.

Paolo.

//////////////////////

[-- Attachment #2: CL_50509 --]
[-- Type: text/plain, Size: 137 bytes --]

2011-09-24  John Salmon  <john.salmon@deshaw.com>

	PR libstdc++/50509
	* include/bits/random.tcc (seed_seq::generate): Fix computation.

[-- Attachment #3: patch_50509 --]
[-- Type: text/plain, Size: 905 bytes --]

Index: include/bits/random.tcc
===================================================================
--- include/bits/random.tcc	(revision 179143)
+++ include/bits/random.tcc	(working copy)
@@ -2768,7 +2768,7 @@
 	  _Type __arg = (__begin[__k % __n]
 			 ^ __begin[(__k + __p) % __n]
 			 ^ __begin[(__k - 1) % __n]);
-	  _Type __r1 = __arg ^ (__arg << 27);
+	  _Type __r1 = __arg ^ (__arg >> 27);
 	  __r1 = __detail::__mod<_Type, __detail::_Shift<_Type, 32>::__value,
 	                         1664525u, 0u>(__r1);
 	  _Type __r2 = __r1;
@@ -2790,7 +2790,7 @@
 	  _Type __arg = (__begin[__k % __n]
 			 + __begin[(__k + __p) % __n]
 			 + __begin[(__k - 1) % __n]);
-	  _Type __r3 = __arg ^ (__arg << 27);
+	  _Type __r3 = __arg ^ (__arg >> 27);
 	  __r3 = __detail::__mod<_Type, __detail::_Shift<_Type, 32>::__value,
 	                         1566083941u, 0u>(__r3);
 	  _Type __r4 = __r3 - __k % __n;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-09-24 18:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-24 21:30 [v3] libstdc++/50509 Paolo Carlini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).