diff options
author | Jan Hubicka <jh@suse.cz> | 2009-04-05 00:08:19 +0000 |
---|---|---|
committer | Jan Hubicka <jh@suse.cz> | 2009-04-05 00:08:19 +0000 |
commit | 993b2f36d970dd8d55e8698006ab936ffa24fb00 (patch) | |
tree | d7bf7e3c5400abfd7c0d9817e8093c0bd9212d80 /libstdc++-v3 | |
parent | f0a1279a33431867a5b0144e01f482d2020ee738 (diff) |
Merge from mainline.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/pretty-ipa@145555 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
13 files changed, 57 insertions, 24 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index f0b1da6b2e1..10aab831733 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,33 @@ +2009-04-04 Edward Smith-Rowland <3dw4rd@verizon.net> + + * include/bits/random.h (struct _ShiftMin1): Fix small typo and + thinko. + * testsuite/26_numerics/random/mersenne_twister_engine/cons/ + default.cc: Enable. + +2009-04-04 Paolo Carlini <paolo.carlini@oracle.com> + + PR libstdc++/39629 (partial) + * testsuite/26_numerics/random/independent_bits_engine/cons/ + base_move.cc: Use uint_fast64_t instead of unsigned long. + * testsuite/26_numerics/random/independent_bits_engine/cons/ + seed1.cc: Likewise. + * testsuite/26_numerics/random/independent_bits_engine/cons/ + seed2.cc: Likewise. + * testsuite/26_numerics/random/independent_bits_engine/cons/ + base_copy.cc: Likewise. + * testsuite/26_numerics/random/independent_bits_engine/cons/ + default.cc: Likewise. + * testsuite/26_numerics/random/independent_bits_engine/cons/ + seed_seq.cc: Likewise. + * testsuite/26_numerics/random/independent_bits_engine/ + requirements/typedefs.cc: Likewise. + * testsuite/26_numerics/random/independent_bits_engine/ + operators/equal.cc: Likewise. + * testsuite/26_numerics/random/independent_bits_engine/ + operators/serialize.cc: Likewise. + * testsuite/26_numerics/random/mt19937_64.cc: Use ull. + 2009-04-03 Paolo Carlini <paolo.carlini@oracle.com> * include/tr1_impl/random: Remove, empty. diff --git a/libstdc++-v3/include/bits/random.h b/libstdc++-v3/include/bits/random.h index 33cf513a992..b2520e2bc82 100644 --- a/libstdc++-v3/include/bits/random.h +++ b/libstdc++-v3/include/bits/random.h @@ -78,14 +78,17 @@ namespace std bool = __w <static_cast<size_t> (std::numeric_limits<_UIntType>::digits)> struct _ShiftMin1 - { + { static const _UIntType __value = - __gnu_cxx::__numeric_traits<_UIntType>::max; + __gnu_cxx::__numeric_traits<_UIntType>::__max; }; template<typename _UIntType, size_t __w> struct _ShiftMin1<_UIntType, __w, true> - { static const _UIntType __value = _UIntType(1) << __w - _UIntType(1); }; + { + static const _UIntType __value = + (_UIntType(1) << __w) - _UIntType(1); + }; template<typename _Tp, _Tp __a, _Tp __c, _Tp __m, bool> struct _Mod; diff --git a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/base_copy.cc b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/base_copy.cc index efaa94b2f64..e66d0147fe9 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/base_copy.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/base_copy.cc @@ -2,7 +2,7 @@ // // 2008-12-07 Edward M. Smith-Rowland <3dw4rd@verizon.net> // -// Copyright (C) 2008 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009 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 @@ -36,7 +36,7 @@ test01() base_engine b; - std::independent_bits_engine<base_engine, 48, unsigned long> e(b); + std::independent_bits_engine<base_engine, 48, uint_fast64_t> e(b); } int main() diff --git a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/base_move.cc b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/base_move.cc index 8adcecd25ef..acbe4028892 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/base_move.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/base_move.cc @@ -2,7 +2,7 @@ // // 2008-12-07 Edward M. Smith-Rowland <3dw4rd@verizon.net> // -// Copyright (C) 2008 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009 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 @@ -34,7 +34,7 @@ test01() typedef std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12> base_engine; - std::independent_bits_engine<base_engine, 48, unsigned long> + std::independent_bits_engine<base_engine, 48, uint_fast64_t> e(std::move(base_engine())); } diff --git a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/default.cc index 2ccd4e8d557..e41220a2c0f 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/default.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/default.cc @@ -2,7 +2,7 @@ // // 2008-12-07 Edward M. Smith-Rowland <3dw4rd@verizon.net> // -// Copyright (C) 2008 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009 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 @@ -35,7 +35,7 @@ test01() < std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>, 48, - unsigned long + uint_fast64_t > e; } diff --git a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/seed1.cc b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/seed1.cc index e774b760c9c..22ff231c89a 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/seed1.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/seed1.cc @@ -2,7 +2,7 @@ // // 2008-12-07 Edward M. Smith-Rowland <3dw4rd@verizon.net> // -// Copyright (C) 2008 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009 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 @@ -37,7 +37,7 @@ test01() < std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>, 48, - unsigned long + uint_fast64_t > e(seed); } diff --git a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/seed2.cc b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/seed2.cc index e4362d6165d..6f1880f5c9c 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/seed2.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/seed2.cc @@ -2,7 +2,7 @@ // // 2008-12-07 Edward M. Smith-Rowland <3dw4rd@verizon.net> // -// Copyright (C) 2008 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009 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 @@ -37,7 +37,7 @@ test01() < std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>, 48, - unsigned long + uint_fast64_t > e(seed); } diff --git a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/seed_seq.cc b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/seed_seq.cc index 628af20b96f..275f5d2a025 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/seed_seq.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/seed_seq.cc @@ -2,7 +2,7 @@ // // 2008-12-07 Edward M. Smith-Rowland <3dw4rd@verizon.net> // -// Copyright (C) 2008 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009 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 @@ -37,7 +37,7 @@ test01() < std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>, 48, - unsigned long + uint_fast64_t > e(seq); } diff --git a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/operators/equal.cc index 6147cf0d5ac..82548696951 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/operators/equal.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/operators/equal.cc @@ -2,7 +2,7 @@ // // 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> // -// Copyright (C) 2008 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009 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 @@ -33,7 +33,7 @@ test01() std::independent_bits_engine <std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>, - 48, unsigned long> u, v; + 48, uint_fast64_t> u, v; VERIFY( u == v ); diff --git a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/operators/serialize.cc b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/operators/serialize.cc index a92553e10cd..d140c8b3efc 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/operators/serialize.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/operators/serialize.cc @@ -2,7 +2,7 @@ // // 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> // -// Copyright (C) 2008 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009 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 @@ -35,7 +35,7 @@ test01() std::stringstream str; std::independent_bits_engine <std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>, - 48, unsigned long> u, v; + 48, uint_fast64_t> u, v; u(); // advance str << u; diff --git a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/requirements/typedefs.cc b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/requirements/typedefs.cc index f268e9ad808..d37c156cbce 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/requirements/typedefs.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/requirements/typedefs.cc @@ -3,7 +3,7 @@ // // 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> // -// Copyright (C) 2008 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009 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 @@ -35,7 +35,7 @@ test01() < uint_fast64_t, 48, 5, 12 >, - 48, unsigned long + 48, uint_fast64_t > test_type; typedef test_type::result_type result_type; diff --git a/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/cons/default.cc index e335b82217b..8125178f834 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/cons/default.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/cons/default.cc @@ -40,7 +40,7 @@ test01() 0xefc60000ul, 18, 1812433253ul> x; VERIFY( x.min() == 0 ); - // XXX VERIFY( x.max() == 4294967295ul); + VERIFY( x.max() == 4294967295ul ); VERIFY( x() == 3499211612ul ); } diff --git a/libstdc++-v3/testsuite/26_numerics/random/mt19937_64.cc b/libstdc++-v3/testsuite/26_numerics/random/mt19937_64.cc index 2ec8a54ce5e..b557fd3956f 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/mt19937_64.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/mt19937_64.cc @@ -2,7 +2,7 @@ // // 2008-11-18 Edward M. Smith-Rowland <3dw4rd@verizon.net> // -// Copyright (C) 2006, 2008 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009 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 @@ -34,7 +34,7 @@ test01() std::mt19937_64 a; a.discard(9999); - VERIFY( a() == 9981545732273789042ul ); + VERIFY( a() == 9981545732273789042ull ); } int main() |