This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Puzzle computing arrays


Brian Dessent wrote:
Angelo Graziosi wrote:

Instead the SSE-math does not work on Cygwin:

$ gfortran -mfpmath=sse test_case.f90 -o test_case
f951: warning: SSE instruction set disabled, using 387 arithmetics

I seriously doubt that this has anything to do with Cygwin. You didn't specify any -march, and the default if none was specified is the original 386 instruction set which does not contain any vector instructions. You can also explicitly enable those instructions with -msse or -msse2, but specifying the proper -march is a cleaner way to do it than indicating piecewise what is available, IMO. See also -march=native.

Brian

I can reproduce nearly the exact behavior with the test case on x86-64-Linux using -m32. The problem also disappears with -m32 -ffloat-store. So I think this is the age old 80 bit floating point issue. See pr323.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323

Cheers,

Jerry

]$ gfc -m32 testcase.f90
[jerry@lenova test]$ ./a.out
0 0.0000000000000000 0.0000000000000000 0.0000000000000000
1 -7.10542735760100186E-015 -7.10542735760100186E-015 0.0000000000000000
2 0.0000000000000000 0.0000000000000000 0.0000000000000000
[jerry@lenova test]$ gfc -m32 -ffloat-store testcase.f90
[jerry@lenova test]$ ./a.out
0 0.0000000000000000 0.0000000000000000 0.0000000000000000
1 0.0000000000000000 0.0000000000000000 0.0000000000000000
2 0.0000000000000000 0.0000000000000000 0.0000000000000000



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]