https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105081
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:d6a6a4ea086d6af97bd7fbd482f51df41c265b79 commit r14-2217-gd6a6a4ea086d6af97bd7fbd482f51df41c265b79 Author: Jonathan Wakely <jwak...@redhat.com> Date: Fri Jun 30 14:37:59 2023 +0100 libstdc++: Make std::random_device throw more std::system_error [PR105081] In r14-289-gf9412cedd6c0e7 I made the std::random_device constructor throw std::system_error for unrecognized tokens. But it still throws std::runtime_error for a token such as "rdseed" that is recognized but not supported at runtime by the CPU the program is running on. With this change we throw std::system_error for those cases too. This fixes the following failures on Intel CPUs withour rdseed support: FAIL: 26_numerics/random/random_device/94087.cc execution test FAIL: 26_numerics/random/random_device/cons/token.cc execution test FAIL: 26_numerics/random/random_device/entropy.cc execution test libstdc++-v3/ChangeLog: PR libstdc++/105081 * src/c++11/random.cc (random_device::_M_init): Throw std::system_error when the requested device is a valid token but not available at runtime.