[fortran, patch] IEEE intrinsic modules (ping)

FX fxcoudert@gmail.com
Sun Jul 6 20:13:00 GMT 2014


Dear Rainer,

> Unfortunately, while the patch works fine on Solaris/x86, it broke
> Solaris/SPARC bootstrap for trivial reasons: contrary to the ChangeLog,
> configure and config.h.in weren't regenerated, thus FPSETSTICKY
> wasn't defined.

I apologize. Thanks for checking in the fix.


> FAIL: gfortran.dg/ieee/ieee_6.f90   -Os  execution test
> 
> The test aborts at l.47, but unfortunately I cannot print mode in gdb 7.7.

That’s weird, especially if that one fails but ieee_rounding_1.f90 works. Let me know if I can do anything to help debug this.


> The following patch corrects this, at the same time fixing this warning:
> 
> /fpu-target.h:451:3: warning: implicit declaration of function 'assert' [-Wimplicit-function-declaration]
>   assert (sizeof(fpu_state_t) <= GFC_FPE_STATE_BUFFER_SIZE);

Actually, it makes a lot of sense to change these into static assertions: this way, any target-specific issues with FP-state buffer size will show up at libgfortran-building-time, rather than be swept under the rug.

Since libgfortran is compiled with GCC, which supports _Static_assert since 4.6, I propose the attached patch.
Built and tested on x86_64-linux, OK to commit?

FX


-------------- next part --------------
A non-text attachment was scrubbed...
Name: static_assert.ChangeLog
Type: application/octet-stream
Size: 165 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20140706/b4d11485/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: static_assert.diff
Type: application/octet-stream
Size: 4924 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20140706/b4d11485/attachment-0001.obj>


More information about the Fortran mailing list