https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82229
krzysio.kurek at wp dot pl changed: What |Removed |Added ---------------------------------------------------------------------------- Version|7.1.0 |7.2.0 --- Comment #17 from krzysio.kurek at wp dot pl --- I've been trying to create a minimal testcase but I've not been able to. Seemingly random actions like changing the directory from the build dir back into it prevents the bug from manifesting. Looking at results of Valgrind's tool, Callgrind, I've managed to find the hog being Random::get() calls not being optimized as aggressively on GCC7 as on GCC6. On GCC6, std::mersenne_twister_engine is being called directly from the main world simulation loop, whereas on GCC7, Random::get() is called every time calculations on random numbers are made. Random::get() in turn calls std::uniform_int_distribution which then calls the mersenne engine.