On Sat, Mar 17, 2012 at 19:23, Janne Blomqvist <blomqvist.ja...@gmail.com> wrote: > Hi, > > a recent patch by yours truly caused incorrect output for the > combination of scale factor, the value containing initial zeroes, and > F editing. Fixed by moving the removal of the initial zeros until > after the scale factor has been applied to the value. Committed the > patch below as obvious after regtesting and running the NIST > testsuite.
And upon request, a testcase reduced from the NIST testsuite, which caught the bug in the first place: 2012-03-17 Janne Blomqvist <j...@gcc.gnu.org> PR libfortran/52608 * gfortran.dh/pr52608.f90: New test. ! { dg-do run } ! PR 52608 ! Testcase reduced from NIST testsuite FM110 program fm110_snippet implicit none real :: aavs character(len=100) :: s(2), s2(2) AAVS = .087654 35043 FORMAT (" ",16X,"COMPUTED: ",22X,1P/26X,F5.4,3X,2P,F5.3,+3P," ",& (23X,F6.2),3X) 5043 FORMAT (17X,"CORRECT: ",/24X,& " .8765 8.765 87.65") WRITE (s,35043) AAVS,AAVS,AAVS WRITE (s2,5043) if (s(2) /= s2(2)) call abort() end program fm110_snippet Committed as obvious. -- Janne Blomqvist