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: ieee on Windows problem




On 6/29/2014 12:53 PM, FX wrote:
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.

Given that it doesn’t break anything on x86_64-apple-darwin (which also uses fpu-387.h), and it should fix mingw (I’ve separately tested the new struct size with a cross-compiler), I’ve now committed the patch as revision 212126.

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).

If you could test your original example with the new version, and also run the tests in the gcc/testsuite/gfortran.dg/ieee directory, that’d be really great. Many thanks again!

FX



Just got the build completed with the patch. The program that failed before works fine now. I will try some of the other test programs tomorrow. Meanwhile, I have posted the link to the new (corrected) build on the gfortran wiki page so others can try the compiler also.



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