Distilled from NIST test FM101.FOR:

      RCON21 = 9.
      RCON22 = .9
      WRITE(*,'(F2.0,1H,,F2.1)')RCON21,RCON22
      END

$ gfortran b.f
$ ./a.out
9,**

first data item should be two wide (not sure if the '.' is required). The second
should not overflow.


$ g77 b.f
$ ./a.out
9.,.9
$ gfortran --version
GNU Fortran 95 (GCC 3.5-tree-ssa 20040326 (merged 20040307))

-- 
           Summary: [gfortran] F edit descriptor creates wrong field width
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bdavis9659 at comcast dot net
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14746

Reply via email to