FX <[email protected]> writes:
>> 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.
No worries: if only all bootstrap failures were that easy to 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.
I see now what's going on: mode is 1 on that line, while ieee_to_zero is 3.
Looking at Solaris <ieeefp.h> explains what happens:
#if defined(__sparc)
/*
* NOTE: the values given are chosen to match those used by the
* RD (Round Direction) field of the FSR (Floating Point State Register).
*/
typedef enum fp_rnd {
FP_RN = 0, /* round to nearest representable number, tie -> even */
FP_RZ = 1, /* round toward zero (truncate) */
FP_RP = 2, /* round toward plus infinity */
FP_RM = 3 /* round toward minus infinity */
} fp_rnd;
#endif
while the i386/amd64 values are the usual ones. Unfortunately,
gcc/fortran/libgfortran.h hardcodes the more common values for
GFC_FPE_*, and libgfortran/Makefile.am extracts them from there into
fpu-target.inc. I'm unsure what's the best way to handle this.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University