summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-30 00:50:24 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-30 00:50:24 +0000
commit8f1349db3b1bf2be744c127d358f63996eb31f41 (patch)
tree92998be8e05be8e8b4891da6586bae2e8596cf7f /libstdc++-v3
parent1b3b52378c0afd97d13c4d5c7ce7b35db42281ed (diff)
downloadgcc-8f1349db3b1bf2be744c127d358f63996eb31f41.tar.gz
2009-09-29 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/random.tcc: Define static const data members. * include/tr1/random.tcc: Likewise. * testsuite/26_numerics/random/subtract_with_carry_engine/ requirements/constants.cc: New. * testsuite/26_numerics/random/mersenne_twister_engine/ requirements/constants.cc: Likewise. * testsuite/26_numerics/random/linear_congruential_engine/ requirements/constants.cc: Likewise. * testsuite/26_numerics/random/shuffle_order_engine/requirements/ constants.cc: Likewise. * testsuite/tr1/5_numerical_facilities/random/subtract_with_carry/ requirements/constants.cc: Likewise. * testsuite/tr1/5_numerical_facilities/random/ subtract_with_carry_01/requirements/constants.cc: Likewise. * testsuite/tr1/5_numerical_facilities/random/discard_block/ requirements/constants.cc: Likewise. * testsuite/tr1/5_numerical_facilities/random/linear_congruential/ requirements/constants.cc: Likewise. * testsuite/tr1/5_numerical_facilities/random/mersenne_twister/ requirements/constants.cc: Likewise. * testsuite/tr1/5_numerical_facilities/random/xor_combine/ requirements/constants.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152317 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog35
-rw-r--r--libstdc++-v3/include/bits/random.tcc172
-rw-r--r--libstdc++-v3/include/tr1/random.tcc133
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/requirements/constants.cc40
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/requirements/constants.cc50
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/requirements/constants.cc38
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/requirements/constants.cc40
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/discard_block/requirements/constants.cc36
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/linear_congruential/requirements/constants.cc37
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/mersenne_twister/requirements/constants.cc45
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/subtract_with_carry/requirements/constants.cc37
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/subtract_with_carry_01/requirements/constants.cc37
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/xor_combine/requirements/constants.cc37
13 files changed, 732 insertions, 5 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 04239e502ab..6cdbedf0c6f 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,4 +1,29 @@
-2009-09-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+2009-09-29 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/bits/random.tcc: Define static const data members.
+ * include/tr1/random.tcc: Likewise.
+ * testsuite/26_numerics/random/subtract_with_carry_engine/
+ requirements/constants.cc: New.
+ * testsuite/26_numerics/random/mersenne_twister_engine/
+ requirements/constants.cc: Likewise.
+ * testsuite/26_numerics/random/linear_congruential_engine/
+ requirements/constants.cc: Likewise.
+ * testsuite/26_numerics/random/shuffle_order_engine/requirements/
+ constants.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/random/subtract_with_carry/
+ requirements/constants.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/random/
+ subtract_with_carry_01/requirements/constants.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/random/discard_block/
+ requirements/constants.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/random/linear_congruential/
+ requirements/constants.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/random/mersenne_twister/
+ requirements/constants.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/random/xor_combine/
+ requirements/constants.cc: Likewise.
+
+2009-09-29 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
PR libstdc++/38923
* acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Avoid 'head',
@@ -8,10 +33,10 @@
2009-09-28 Benjamin Kosnik <bkoz@redhat.com>
- * libsupc++/eh_terminate.cc: Fixes for -fno-exceptions.
- * libsupc++/vec.cc: Same.
- * libsupc++/vterminate.cc: Same.
- * libsupc++/new_opnt.cc: Same.
+ * libsupc++/eh_terminate.cc: Fixes for -fno-exceptions.
+ * libsupc++/vec.cc: Same.
+ * libsupc++/vterminate.cc: Same.
+ * libsupc++/new_opnt.cc: Same.
2009-09-28 Johannes Singler <singler@ira.uka.de>
diff --git a/libstdc++-v3/include/bits/random.tcc b/libstdc++-v3/include/bits/random.tcc
index e4c39612b7f..712426ec9b6 100644
--- a/libstdc++-v3/include/bits/random.tcc
+++ b/libstdc++-v3/include/bits/random.tcc
@@ -89,6 +89,23 @@ namespace std
};
} // namespace __detail
+
+ template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+ const _UIntType
+ linear_congruential_engine<_UIntType, __a, __c, __m>::multiplier;
+
+ template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+ const _UIntType
+ linear_congruential_engine<_UIntType, __a, __c, __m>::increment;
+
+ template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+ const _UIntType
+ linear_congruential_engine<_UIntType, __a, __c, __m>::modulus;
+
+ template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+ const _UIntType
+ linear_congruential_engine<_UIntType, __a, __c, __m>::default_seed;
+
/**
* Seeds the LCR with integral value @p __s, adjusted so that the
* ring identity is never a member of the convergence set.
@@ -174,6 +191,133 @@ namespace std
_UIntType __a, size_t __u, _UIntType __d, size_t __s,
_UIntType __b, size_t __t, _UIntType __c, size_t __l,
_UIntType __f>
+ const size_t
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+ __s, __b, __t, __c, __l, __f>::word_size;
+
+ template<typename _UIntType,
+ size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+ _UIntType __f>
+ const size_t
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+ __s, __b, __t, __c, __l, __f>::state_size;
+
+ template<typename _UIntType,
+ size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+ _UIntType __f>
+ const size_t
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+ __s, __b, __t, __c, __l, __f>::shift_size;
+
+ template<typename _UIntType,
+ size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+ _UIntType __f>
+ const size_t
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+ __s, __b, __t, __c, __l, __f>::mask_bits;
+
+ template<typename _UIntType,
+ size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+ _UIntType __f>
+ const _UIntType
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+ __s, __b, __t, __c, __l, __f>::xor_mask;
+
+ template<typename _UIntType,
+ size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+ _UIntType __f>
+ const size_t
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+ __s, __b, __t, __c, __l, __f>::tempering_u;
+
+ template<typename _UIntType,
+ size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+ _UIntType __f>
+ const _UIntType
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+ __s, __b, __t, __c, __l, __f>::tempering_d;
+
+ template<typename _UIntType,
+ size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+ _UIntType __f>
+ const size_t
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+ __s, __b, __t, __c, __l, __f>::tempering_s;
+
+ template<typename _UIntType,
+ size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+ _UIntType __f>
+ const _UIntType
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+ __s, __b, __t, __c, __l, __f>::tempering_b;
+
+ template<typename _UIntType,
+ size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+ _UIntType __f>
+ const size_t
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+ __s, __b, __t, __c, __l, __f>::tempering_t;
+
+ template<typename _UIntType,
+ size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+ _UIntType __f>
+ const _UIntType
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+ __s, __b, __t, __c, __l, __f>::tempering_c;
+
+ template<typename _UIntType,
+ size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+ _UIntType __f>
+ const size_t
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+ __s, __b, __t, __c, __l, __f>::tempering_l;
+
+ template<typename _UIntType,
+ size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+ _UIntType __f>
+ const _UIntType
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+ __s, __b, __t, __c, __l, __f>::
+ initialization_multiplier;
+
+ template<typename _UIntType,
+ size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+ _UIntType __f>
+ const _UIntType
+ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
+ __s, __b, __t, __c, __l, __f>::default_seed;
+
+ template<typename _UIntType,
+ size_t __w, size_t __n, size_t __m, size_t __r,
+ _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+ _UIntType __b, size_t __t, _UIntType __c, size_t __l,
+ _UIntType __f>
void
mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d,
__s, __b, __t, __c, __l, __f>::
@@ -341,6 +485,22 @@ namespace std
template<typename _UIntType, size_t __w, size_t __s, size_t __r>
+ const size_t
+ subtract_with_carry_engine<_UIntType, __w, __s, __r>::word_size;
+
+ template<typename _UIntType, size_t __w, size_t __s, size_t __r>
+ const size_t
+ subtract_with_carry_engine<_UIntType, __w, __s, __r>::short_lag;
+
+ template<typename _UIntType, size_t __w, size_t __s, size_t __r>
+ const size_t
+ subtract_with_carry_engine<_UIntType, __w, __s, __r>::long_lag;
+
+ template<typename _UIntType, size_t __w, size_t __s, size_t __r>
+ const _UIntType
+ subtract_with_carry_engine<_UIntType, __w, __s, __r>::default_seed;
+
+ template<typename _UIntType, size_t __w, size_t __s, size_t __r>
void
subtract_with_carry_engine<_UIntType, __w, __s, __r>::
seed(result_type __value)
@@ -475,6 +635,14 @@ namespace std
template<typename _RandomNumberEngine, size_t __p, size_t __r>
+ const size_t
+ discard_block_engine<_RandomNumberEngine, __p, __r>::block_size;
+
+ template<typename _RandomNumberEngine, size_t __p, size_t __r>
+ const size_t
+ discard_block_engine<_RandomNumberEngine, __p, __r>::used_block;
+
+ template<typename _RandomNumberEngine, size_t __p, size_t __r>
typename discard_block_engine<_RandomNumberEngine,
__p, __r>::result_type
discard_block_engine<_RandomNumberEngine, __p, __r>::
@@ -577,6 +745,10 @@ namespace std
template<typename _RandomNumberEngine, size_t __k>
+ const size_t
+ shuffle_order_engine<_RandomNumberEngine, __k>::table_size;
+
+ template<typename _RandomNumberEngine, size_t __k>
typename shuffle_order_engine<_RandomNumberEngine, __k>::result_type
shuffle_order_engine<_RandomNumberEngine, __k>::
operator()()
diff --git a/libstdc++-v3/include/tr1/random.tcc b/libstdc++-v3/include/tr1/random.tcc
index 855f48c7b51..818777d3e22 100644
--- a/libstdc++-v3/include/tr1/random.tcc
+++ b/libstdc++-v3/include/tr1/random.tcc
@@ -89,6 +89,19 @@ namespace tr1
};
} // namespace __detail
+
+ template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+ const _UIntType
+ linear_congruential<_UIntType, __a, __c, __m>::multiplier;
+
+ template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+ const _UIntType
+ linear_congruential<_UIntType, __a, __c, __m>::increment;
+
+ template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+ const _UIntType
+ linear_congruential<_UIntType, __a, __c, __m>::modulus;
+
/**
* Seeds the LCR with integral value @p __x0, adjusted so that the
* ring identity is never a member of the convergence set.
@@ -177,6 +190,83 @@ namespace tr1
template<class _UIntType, int __w, int __n, int __m, int __r,
_UIntType __a, int __u, int __s,
_UIntType __b, int __t, _UIntType __c, int __l>
+ const int
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::word_size;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const int
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::state_size;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const int
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::shift_size;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const int
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::mask_bits;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const _UIntType
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::parameter_a;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const int
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::output_u;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const int
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::output_s;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const _UIntType
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::output_b;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const int
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::output_t;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const _UIntType
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::output_c;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const int
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::output_l;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
void
mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
__b, __t, __c, __l>::
@@ -312,6 +402,18 @@ namespace tr1
template<typename _IntType, _IntType __m, int __s, int __r>
+ const _IntType
+ subtract_with_carry<_IntType, __m, __s, __r>::modulus;
+
+ template<typename _IntType, _IntType __m, int __s, int __r>
+ const int
+ subtract_with_carry<_IntType, __m, __s, __r>::long_lag;
+
+ template<typename _IntType, _IntType __m, int __s, int __r>
+ const int
+ subtract_with_carry<_IntType, __m, __s, __r>::short_lag;
+
+ template<typename _IntType, _IntType __m, int __s, int __r>
void
subtract_with_carry<_IntType, __m, __s, __r>::
seed(unsigned long __value)
@@ -432,6 +534,18 @@ namespace tr1
template<typename _RealType, int __w, int __s, int __r>
+ const int
+ subtract_with_carry_01<_RealType, __w, __s, __r>::word_size;
+
+ template<typename _RealType, int __w, int __s, int __r>
+ const int
+ subtract_with_carry_01<_RealType, __w, __s, __r>::long_lag;
+
+ template<typename _RealType, int __w, int __s, int __r>
+ const int
+ subtract_with_carry_01<_RealType, __w, __s, __r>::short_lag;
+
+ template<typename _RealType, int __w, int __s, int __r>
void
subtract_with_carry_01<_RealType, __w, __s, __r>::
_M_initialize_npows()
@@ -576,6 +690,13 @@ namespace tr1
return __is;
}
+ template<class _UniformRandomNumberGenerator, int __p, int __r>
+ const int
+ discard_block<_UniformRandomNumberGenerator, __p, __r>::block_size;
+
+ template<class _UniformRandomNumberGenerator, int __p, int __r>
+ const int
+ discard_block<_UniformRandomNumberGenerator, __p, __r>::used_block;
template<class _UniformRandomNumberGenerator, int __p, int __r>
typename discard_block<_UniformRandomNumberGenerator,
@@ -641,6 +762,18 @@ namespace tr1
template<class _UniformRandomNumberGenerator1, int __s1,
class _UniformRandomNumberGenerator2, int __s2>
+ const int
+ xor_combine<_UniformRandomNumberGenerator1, __s1,
+ _UniformRandomNumberGenerator2, __s2>::shift1;
+
+ template<class _UniformRandomNumberGenerator1, int __s1,
+ class _UniformRandomNumberGenerator2, int __s2>
+ const int
+ xor_combine<_UniformRandomNumberGenerator1, __s1,
+ _UniformRandomNumberGenerator2, __s2>::shift2;
+
+ template<class _UniformRandomNumberGenerator1, int __s1,
+ class _UniformRandomNumberGenerator2, int __s2>
void
xor_combine<_UniformRandomNumberGenerator1, __s1,
_UniformRandomNumberGenerator2, __s2>::
diff --git a/libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/requirements/constants.cc b/libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/requirements/constants.cc
new file mode 100644
index 00000000000..af0c4b1e356
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/requirements/constants.cc
@@ -0,0 +1,40 @@
+// { dg-do link }
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2009-09-29 Paolo Carlini <paolo.carlini@oracle.com>
+//
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+void test01()
+{
+ std::minstd_rand0 lc;
+
+ const void* p = &lc.multiplier;
+ p = &lc.increment;
+ p = &lc.modulus;
+ p = &lc.default_seed;
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/requirements/constants.cc b/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/requirements/constants.cc
new file mode 100644
index 00000000000..2abc5ab9b64
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/requirements/constants.cc
@@ -0,0 +1,50 @@
+// { dg-do link }
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2009-09-29 Paolo Carlini <paolo.carlini@oracle.com>
+//
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+void test01()
+{
+ std::mt19937 mt;
+
+ const void* p = &mt.word_size;
+ p = &mt.state_size;
+ p = &mt.shift_size;
+ p = &mt.mask_bits;
+ p = &mt.xor_mask;
+ p = &mt.tempering_u;
+ p = &mt.tempering_d;
+ p = &mt.tempering_s;
+ p = &mt.tempering_b;
+ p = &mt.tempering_t;
+ p = &mt.tempering_c;
+ p = &mt.tempering_l;
+ p = &mt.initialization_multiplier;
+ p = &mt.default_seed;
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/requirements/constants.cc b/libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/requirements/constants.cc
new file mode 100644
index 00000000000..c1d5b3a2e45
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/requirements/constants.cc
@@ -0,0 +1,38 @@
+// { dg-do link }
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2009-09-29 Paolo Carlini <paolo.carlini@oracle.com>
+//
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+void test01()
+{
+ std::knuth_b so;
+
+ const void* p = &so.table_size;
+ p = &so.table_size;
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/requirements/constants.cc b/libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/requirements/constants.cc
new file mode 100644
index 00000000000..2ab13a30309
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/requirements/constants.cc
@@ -0,0 +1,40 @@
+// { dg-do link }
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2009-09-29 Paolo Carlini <paolo.carlini@oracle.com>
+//
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+void test01()
+{
+ std::ranlux24_base swc;
+
+ const void* p = &swc.word_size;
+ p = &swc.short_lag;
+ p = &swc.long_lag;
+ p = &swc.default_seed;
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/discard_block/requirements/constants.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/discard_block/requirements/constants.cc
new file mode 100644
index 00000000000..2c43732041c
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/discard_block/requirements/constants.cc
@@ -0,0 +1,36 @@
+// { dg-do link }
+//
+// 2009-09-29 Paolo Carlini <paolo.carlini@oracle.com>
+//
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <tr1/random>
+
+void test01()
+{
+ std::tr1::ranlux3 db;
+
+ const void* p = &db.block_size;
+ p = &db.used_block;
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/linear_congruential/requirements/constants.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/linear_congruential/requirements/constants.cc
new file mode 100644
index 00000000000..c38254f13d4
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/linear_congruential/requirements/constants.cc
@@ -0,0 +1,37 @@
+// { dg-do link }
+//
+// 2009-09-29 Paolo Carlini <paolo.carlini@oracle.com>
+//
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <tr1/random>
+
+void test01()
+{
+ std::tr1::minstd_rand0 lc;
+
+ const void* p = &lc.multiplier;
+ p = &lc.increment;
+ p = &lc.modulus;
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/mersenne_twister/requirements/constants.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/mersenne_twister/requirements/constants.cc
new file mode 100644
index 00000000000..9ebddd8c6d0
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/mersenne_twister/requirements/constants.cc
@@ -0,0 +1,45 @@
+// { dg-do link }
+//
+// 2009-09-29 Paolo Carlini <paolo.carlini@oracle.com>
+//
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <tr1/random>
+
+void test01()
+{
+ std::tr1::mt19937 mt;
+
+ const void* p = &mt.word_size;
+ p = &mt.state_size;
+ p = &mt.shift_size;
+ p = &mt.mask_bits;
+ p = &mt.parameter_a;
+ p = &mt.output_u;
+ p = &mt.output_s;
+ p = &mt.output_b;
+ p = &mt.output_t;
+ p = &mt.output_c;
+ p = &mt.output_l;
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/subtract_with_carry/requirements/constants.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/subtract_with_carry/requirements/constants.cc
new file mode 100644
index 00000000000..c68002d2766
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/subtract_with_carry/requirements/constants.cc
@@ -0,0 +1,37 @@
+// { dg-do link }
+//
+// 2009-09-29 Paolo Carlini <paolo.carlini@oracle.com>
+//
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <tr1/random>
+
+void test01()
+{
+ std::tr1::subtract_with_carry<unsigned long, (1UL << 24), 10, 24> swc;
+
+ const void* p = &swc.modulus;
+ p = &swc.long_lag;
+ p = &swc.short_lag;
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/subtract_with_carry_01/requirements/constants.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/subtract_with_carry_01/requirements/constants.cc
new file mode 100644
index 00000000000..c1715264d3a
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/subtract_with_carry_01/requirements/constants.cc
@@ -0,0 +1,37 @@
+// { dg-do link }
+//
+// 2009-09-29 Paolo Carlini <paolo.carlini@oracle.com>
+//
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <tr1/random>
+
+void test01()
+{
+ std::tr1::ranlux_base_01 swc_01;
+
+ const void* p = &swc_01.word_size;
+ p = &swc_01.long_lag;
+ p = &swc_01.short_lag;
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/xor_combine/requirements/constants.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/xor_combine/requirements/constants.cc
new file mode 100644
index 00000000000..0318b0d5e18
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/xor_combine/requirements/constants.cc
@@ -0,0 +1,37 @@
+// { dg-do link }
+//
+// 2009-09-29 Paolo Carlini <paolo.carlini@oracle.com>
+//
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <tr1/random>
+
+void test01()
+{
+ std::tr1::xor_combine<std::tr1::minstd_rand, 1, std::tr1::mt19937, 2>
+ xor_c;
+
+ const void* p = &xor_c.shift1;
+ p = &xor_c.shift2;
+}
+
+int main()
+{
+ test01();
+ return 0;
+}