With Dominique's test case: character(15) :: str="+ .339 567+2" real :: x read(str,'(F15.6)') x print *, x read(str,'(G15.7)') x print *, x end Current trunk yields: $ ./a.out 33.956699 0.33899999 It should be: $ ./a.out 33.95670 33.95670
From the standard: "an internal file or a preconnected file that has not been opened is treated as if the file had been opened with BLANK = 'NULL'." Patch on its way. This is a regression from 4.3.
Subject: Bug 38735 Author: jvdelisle Date: Mon Jan 5 22:55:15 2009 New Revision: 143102 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143102 Log: 2009-01-05 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/38735 * io/unit.c (get_internal_unit): Set default BLANK= status to NULL for internal units. Modified: trunk/libgfortran/ChangeLog trunk/libgfortran/io/unit.c
Subject: Bug 38735 Author: jvdelisle Date: Mon Jan 5 22:57:30 2009 New Revision: 143103 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143103 Log: 2009-01-05 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/38735 * gfortran.dg/fmt_bz_bn.f: Update test. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/fmt_bz_bn.f
Fixed on trunk