[Mingw-w64-public] Will be fesetenv fixed?

2016-12-19 Thread Zidane Sama
Fesetenv does not change fpu rounding mode. This bug already described in https://sourceforge.net/p/mingw-w64/bugs/541/ -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based dev

Re: [Mingw-w64-public] Will be fesetenv fixed?

2016-12-19 Thread David Wohlferd
FWIW, I agree that this code does not look right. The purpose of fesetenv(const fenv_t * envp) is to change the settings of the floating point environment as specified by the parameter. However, instead of using the values from the parameter, the current code *overwrites* the passed in setting

Re: [Mingw-w64-public] Will be fesetenv fixed?

2016-12-20 Thread David Wohlferd
Ahh, the wonders of google. I believe I have found the problem kai's change was originally intended to fix: http://mingw-w64-public.narkive.com/jr5jMaJ2/quadmath-h-s-expq-crashes-at-runtime And, I believe I have found what the actual problem was. I don't think what kai did was the right fi

Re: [Mingw-w64-public] Will be fesetenv fixed?

2016-12-21 Thread JonY
On 12/21/2016 07:29 AM, David Wohlferd wrote: > Ahh, the wonders of google. I believe I have found the problem kai's > change was originally intended to fix: > http://mingw-w64-public.narkive.com/jr5jMaJ2/quadmath-h-s-expq-crashes-at-runtime > > > And, I believe I have found what the actual prob

Re: [Mingw-w64-public] Will be fesetenv fixed?

2016-12-22 Thread David Wohlferd
On 12/21/2016 4:27 AM, JonY wrote: > On 12/21/2016 07:29 AM, David Wohlferd wrote: >> Comments? Zidane, can you try this? > David, can you also test against the gfortran testsuites? Since mingw-w64 doesn't have any gfortran testsuites, I assume you want me to run gcc's. Running "make -k check-f

Re: [Mingw-w64-public] Will be fesetenv fixed?

2016-12-22 Thread Earnie
On 12/22/2016 6:52 AM, David Wohlferd wrote: > On 12/21/2016 4:27 AM, JonY wrote: >> On 12/21/2016 07:29 AM, David Wohlferd wrote: >>> Comments? Zidane, can you try this? >> David, can you also test against the gfortran testsuites? > > Since mingw-w64 doesn't have any gfortran testsuites, I assum

Re: [Mingw-w64-public] Will be fesetenv fixed?

2016-12-22 Thread JonY
On 12/22/2016 11:52 AM, David Wohlferd wrote: > On 12/21/2016 4:27 AM, JonY wrote: >> On 12/21/2016 07:29 AM, David Wohlferd wrote: >>> Comments? Zidane, can you try this? >> David, can you also test against the gfortran testsuites? > > Since mingw-w64 doesn't have any gfortran testsuites, I assu

Re: [Mingw-w64-public] Will be fesetenv fixed?

2016-12-25 Thread David Wohlferd
OK, clear to apply to master, thanks for testing! When I went to push, I had a problem with git that took me a while to sort out. While I was doing that, I realized that this patch wasn't quite right (so I never push-ed it). This x87 stuff is just weird. According to 7.6.4.2 in c99, feho

Re: [Mingw-w64-public] Will be fesetenv fixed?

2016-12-25 Thread David Wohlferd
Attached is an alternate fix. This does everything the previous patch does, plus a bit more. On the plus side it doesn't try to cram the SSE settings into the x87 settings. This not only makes things cleaner to code from the library side, it makes things easier for users who actually want to