The attached code, we compiled with "-O3", gives an incorrect sequence (and different from the sequence without optimization or -O1 or -O2).
This problem was discovered due to incorrect statistical behavior of a Monte Carlo calculation (not attached). -- Summary: Variate_generator with mt19937 and normal_distribution produces wrong sequence for "-O3". Product: gcc Version: 4.4.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: m_albert137 at yahoo dot com GCC host triplet: x86_64-unknown-linux-gnu Core2 Q9550 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41019