[Bug fortran/45129] New: I/O edit descriptors: Warn if the format field is too small for the E and F edit descriptor

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Jul 29 13:52:00 GMT 2010


The following field is too small for the E edit descriptor:

  print '(e4.2)', 1.0
  end

Expected: Print a warning like ifort:

test.f90(1): warning #6894: The field width is too small for the number of
fractional digits.   [2]
print '(e4.2)', 1.0
-----------^

For that example at least 7 digits are needed "(e7.2)" - otherwise **** instead
of ".10E+01" is printed - to be precise 5+<e> where <e> is given exponential
width.

For F, one needs at least <p>+1, i.e. "F2.2" is too small while "F3.2" can be
enough (0 <= |values| < 1).


-- 
           Summary: I/O edit descriptors: Warn if the format field is too
                    small for the E and F edit descriptor
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list