libstdc++: Fix divide by zero in default template argument
authorJonathan Wakely <jwakely@redhat.com>
Wed, 7 Oct 2020 23:34:56 +0000 (00:34 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 7 Oct 2020 23:34:56 +0000 (00:34 +0100)
commit6ae17a3b6835b30102607d45ac89c7a668e2c8d4
tree1ff8bb630a94695a5f2d4d56e617fcc6ea9369c8
parent23f75da95f5e8e09e9fcbd5b0d2885e6c44739aa
libstdc++: Fix divide by zero in default template argument

libstdc++-v3/ChangeLog:

* include/bits/random.h (__detail::_Mod): Avoid divide by zero.
* testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
New test.
libstdc++-v3/include/bits/random.h
libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc [new file with mode: 0644]