https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101866
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:326a020be21aeec77eab9a7247c0591c56745b37 commit r9-9670-g326a020be21aeec77eab9a7247c0591c56745b37 Author: Jonathan Wakely <jwak...@redhat.com> Date: Wed Aug 11 22:11:19 2021 +0100 libstdc++: Fix test that fails randomly [PR101866] This test assumes that the same sequence of three values cannot occur, which is incorect. It's unlikely, but not impossible. Perform the check in a loop, so that in the unlikely event of an identical sequence, we retry. If the library code is buggy it will keep producing the same sequence and the test will time out. If the code is working correctly then we will usually break out of the loop after one iteration, or very rarely after two or three. libstdc++-v3/ChangeLog: PR libstdc++/101866 * testsuite/experimental/random/randint.cc: Loop and retry if reseed() produces the same sequence. (cherry picked from commit 93f1dbc7cdcc4b31ea4061efb4c2acf2d4f81eb8)