https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107660
--- Comment #7 from Tomoya Suzuki <t3suzuki at ucsd dot edu> --- The following code appears to me to work differently with gcc10 and gcc11. #include <vector> #include <algorithm> #include <random> int kRandSeed = 27491095; int main() { const int n = 16384; std::vector<int> v(n); std::mt19937 rng(kRandSeed); //std::minstd_rand rng; for (int i=0; i < n; i++) v[i] = i; std::shuffle(v.begin(), v.end(), rng); for (int i=0; i < n; i++) printf("%d\n", v[i]); }