ieee on Windows problem
FX
fxcoudert@gmail.com
Sun Jun 29 18:27:00 GMT 2014
Dear Brad,
(I’m CC’ing your email to the list, so others can chime in.)
> Great to see that you are back working on improving gfortran. I built a new version of the mingw release of gfortran using the source after you added your new IEEE patches. I have not used IEEE math routines previously, so to test it out, I copied some code from the IBM compiler manual. I compiled the code with
>
> gfortran sample1.f90 -fno-unsafe-math-optimizations -frounding-math -fsignaling-nans
>
> Unfortunately, executing the program produced a strange error message.
>
> Assertion failed: sizeof(my_fenv_t) <= (size_t) GFC_FPE_STATE_BUFFER_SIZE, file ./fpu-target.h, line 434
It looks like on mingw the my_fenv_t struct in libgfortran/config/fpu-387.h has larger size than it should. It probably is the alignment of bitfields __opcode and __unused4. Since we don’t actually access those, the following patch should restore the proper structure size/alignment. Could you check for me? I’ll also check it on x86_64-apple-darwin, and if both go okay, I’ll commit it ASAP.
In addition to your sample, you can find new testsuite files in gcc/testsuite/gfortran.dg/ieee directory. See inside as one of them requires special options (like -ffree-line-length-none -O0).
Cheers, and many many thanks for that quick testing!
FX
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ieee_win.diff
Type: application/octet-stream
Size: 522 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20140629/4e0f1cd3/attachment.obj>
More information about the Fortran
mailing list