[Bug c/66326] Floating point exception with -mfpmath=387 and -fcilkplus.

2015-08-14 Thread ejolson at unr dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66326

--- Comment #3 from Eric ejolson at unr dot edu ---
GCC version 5.2 has come around and the bug is still here.

In particular, compiling for 32-bit Intel or using -mfpmath=387 in 64-bit leads
to immediate floating point exceptions.  The fix was to comment out the define
RESTORE_X86_FP_STATE at the top of
libcilkrts/runtime/config/x86/os-unix-sysdep.c because the code in the restore
and save routines is SSE only.  Note that changing floating point rounding
modes may not function as expected on 32-bit or with -mfpmath=387 set, however,
otherwise this simple fix is effective.

As already before, more information and this work-around is at 

https://software.intel.com/en-us/forums/topic/558825


[Bug c/66326] Floating point exception with -mfpmath=387 and -fcilkplus.

2015-05-28 Thread ejolson at unr dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66326

--- Comment #1 from Eric ejolson at unr dot edu ---
The compilers gcc-5.1 and cilkplus-4_8-branch were bootstrapped using the
Debian 4.7.2-5 gcc compiler on Debian Wheezy.  Compiling and running the test
program yields the following output:

$ /usr/local/gcc-5.1/bin/gcc -fcilkplus -Wall \
-mfpmath=387 fpbug.c -o fpbug-gcc510-387 -lcilkrts -lm
$ ./fpbug-gcc510-387
Floating point exception

$ /usr/local/gcc-5.1/bin/gcc -fcilkplus -Wall \
-mfpmath=sse fpbug.c -o fpbug-gcc510-sse -lcilkrts -lm
$ ./fpbug-gcc510-sse
f(1)+g(2)=0.850648

$ /usr/local/cilk-4.8/bin/gcc -fcilkplus -Wall \
-mfpmath=387 fpbug.c -o fpbug-cilk48-387 -lcilkrts -lm
$ ./fpbug-cilk48-387
f(1)+g(2)=0.850648

$ /usr/local/cilk-4.8/bin/gcc -fcilkplus -Wall \
-mfpmath=sse fpbug.c -o fpbug-cilk48-sse -lcilkrts -lm
$ ./fpbug-cilk48-sse
f(1)+g(2)=0.850648


[Bug c/66326] Floating point exception with -mfpmath=387 and -fcilkplus.

2015-05-28 Thread ejolson at unr dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66326

--- Comment #2 from Eric ejolson at unr dot edu ---
Additional information and discussion about this bug may be found on the Intel
Cilk Plus developer forum at

https://software.intel.com/en-us/forums/topic/558825