OSDN Git Service

2011-09-24 John Salmon <john.salmon@deshaw.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 24 Sep 2011 22:34:50 +0000 (22:34 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 24 Sep 2011 22:34:50 +0000 (22:34 +0000)
PR libstdc++/50510
* include/bits/random.tcc (seed_seq::generate): Fix computation.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179149 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/random.tcc

index 67643de..9add722 100644 (file)
@@ -1,5 +1,10 @@
 2011-09-24  John Salmon  <john.salmon@deshaw.com>
 
+       PR libstdc++/50510
+       * include/bits/random.tcc (seed_seq::generate): Fix computation.
+
+2011-09-24  John Salmon  <john.salmon@deshaw.com>
+
        PR libstdc++/50509
        * include/bits/random.tcc (seed_seq::generate): Fix computation.
 
index d35f2f4..0e74848 100644 (file)
@@ -2796,8 +2796,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
          _Type __r4 = __r3 - __k % __n;
          __r4 = __detail::__mod<_Type,
                   __detail::_Shift<_Type, 32>::__value>(__r4);
-         __begin[(__k + __p) % __n] ^= __r4;
-         __begin[(__k + __q) % __n] ^= __r3;
+         __begin[(__k + __p) % __n] ^= __r3;
+         __begin[(__k + __q) % __n] ^= __r4;
          __begin[__k % __n] = __r4;
        }
     }