[Bug c++/95286] -march=native causes mt19937_64 + uniform_real_distribution generating wrong result.

euloanty at live dot com gcc-bugzilla@gcc.gnu.org
Sat May 23 08:26:37 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95286

--- Comment #4 from fdlbxtqi <euloanty at live dot com> ---
I test on another Amd ryzen computer. Same issue here. Why???

cqwrteur@Home-Server:~/fast_io_all/fast_io/helpers/fp$ g++ -o dontagree
dontagree.cc  -Ofast -std=c++20 -s -march=native
cqwrteur@Home-Server:~/fast_io_all/fast_io/helpers/fp$ ./dontagree
3298476035
cqwrteur@Home-Server:~/fast_io_all/fast_io/helpers/fp$ g++ -o dontagree
dontagree.cc  -Ofast -std=c++20 -s
cqwrteur@Home-Server:~/fast_io_all/fast_io/helpers/fp$ ./dontagree
3298476032
cqwrteur@Home-Server:~/fast_io_all/fast_io/helpers/fp$ clang++ -o dontagree
dontagree.cc -Ofast -std=c++20 -s -march=native
cqwrteur@Home-Server:~/fast_io_all/fast_io/helpers/fp$ ./dontagree
3298476035
cqwrteur@Home-Server:~/fast_io_all/fast_io/helpers/fp$ clang++ -o dontagree
dontagree.cc -Ofast -std=c++20 -s
cqwrteur@Home-Server:~/fast_io_all/fast_io/helpers/fp$ ./dontagree
3298476032
cqwrteur@Home-Server:~/fast_io_all/fast_io/helpers/fp$ clang++ -o dontagree
dontagree.cc -Ofast -std=c++20 -s -march=native -stdlib=libc++
cqwrteur@Home-Server:~/fast_io_all/fast_io/helpers/fp$ ./dontagree
3298476035
cqwrteur@Home-Server:~/fast_io_all/fast_io/helpers/fp$ clang++ -o dontagree
dontagree.cc -Ofast -std=c++20 -s -march=native
cqwrteur@Home-Server:~/fast_io_all/fast_io/helpers/fp$ ./dontagree
3298476035
cqwrteur@Home-Server:~/fast_io_all/fast_io/helpers/fp$ clang++ -o dontagree
dontagree.cc -Ofast -std=c++20 -s
cqwrteur@Home-Server:~/fast_io_all/fast_io/helpers/fp$ ./dontagree
3298476032


More information about the Gcc-bugs mailing list