[patch,fortran] PRs 19363 and 19691, Cygwin failure in formatted write of Inf and NaN

Paul Thomas paulthomas2@wanadoo.fr
Mon Jan 31 23:07:00 GMT 2005


Steven Bosscher wrote:

>On Monday 31 January 2005 23:25, Paul Thomas wrote:
>  
>
>>This also fixes the testsuite failures, under Cygwin, of complex_write.f90,
>>fmt_read.f90 and nan_inf_fmt.f90. No extra compilation warnings. Regtested
>>under CYGWIN_NT-5.1 and RedHat9.
>>
>> PR libfortran/19363 and 19691
>>	* io/write.c (write_float): gfc_isfinite(x): macro substitution for Cygwin
>>of broken isfinite(x) with finite(x).
>>    
>>
>
>Nope.  If anywhere, this should be fixed in the configure test
>that we have for this, or in libgfortran.h.  I'd prefer the
>former.
>
OK will look into that.

>What is broken about them on Cygwin anyway?
>
In the case of the PRs in the subject line- writing +/-Infinity or Nan 
resulted in an error "printf is broken".
complex_write.f90 and fmt_read.f90 are both hit by isfinite detecting 
infinite values that do not exist - for some reason, going through the 
end of the format list and starting over triggers a false infinity. I 
tried to diagnose it but was hit by strange interactions between the 
broken isfinite and st_sprintf/st_printf.  nan_inf_fmt.f90 fails for the 
same reason as the PRs.

Cheers

Paul T




More information about the Fortran mailing list