from NIST test FM405.FOR $ cat e.f CHARACTER B381K(4)*38 B381K(1) = ' 23 23.345 T ENDS ' B381K(2) = ' 23.456 F 98 YOURS PROGRAMS ' B381K(3) = ' 13.1234 13.1234E0 1312.34 ' B381K(4) = ' 5.2345 56 5.2345 T TRUE 5.2345' READ(B381K(3),39036) AVS, BVS, CVS PRINT*,'AVS = ',AVS PRINT*,'BVS = ',BVS PRINT*,'CVS = ',CVS 39036 FORMAT(F9.5, 1X, E9.3, 1X, 2PF7.4) END $ gfortran e.f $ ./a.out AVS = 13.12340 BVS = 13.12340 CVS = 1312.340 ^^^ wrong, should be 13.12340 $ g77 e.f $ ./a.out AVS = 13.1233997 BVS = 13.1233997 CVS = 13.1233997
Confirmed.
Fixed, most likely by this: 2004-09-02 Paul Brook <paul@codesourcery.com> * io/format.c (parse_format_list): Set repeat count for P descriptors. * write.c (output_float): Fix condition. Correctly handle nonzero scale factor.