------- Comment #16 from jvdelisle at gcc dot gnu dot org 2009-12-05 06:29 ------- This is a glibc issue with software sin function. It does not use the FPU.
Just try with -m32. Changing n=50000 $ gfc -m64 untitled.f90 $ time ./a.out -1781878.9 real 0m3.060s user 0m3.050s sys 0m0.003s $ gfc -m32 untitled.f90 $ time ./a.out -1781888.9 real 0m0.234s user 0m0.231s sys 0m0.004s $ The situation is absolutely absurd. I opened a PR for this so long ago, I don't remember the number. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40766