https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90150

            Bug ID: 90150
           Summary: wrong output produced by float format fX.Y descriptor
                    following translated scientific format XpeY.Z
           Product: gcc
           Version: 6.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: perini at wisc dot edu
  Target Milestone: ---

Created attachment 46201
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46201&action=edit
Simple test program that reproduces the error

Hi, 

just found this error in floating point string format in gfortran 7.4.0. 

The error affects floating point output (fX.Y), ONLY when this follows a
scientific output with heading non-zeros (ZpeX.Y).

The fX.Y output number is multiplied i.e. translated by as many digits as in
the previous scientific specifier. The issue seems to happen only when both are
part of a same string format.

The attached program prints the same two numbers (1000.0, 10.0) three times
with the following formats: 
A = 1000.0
b = 10.0

$ a.exe
 0.100E+04   10.000 ! "(1e10.3,1x,f8.3)"
 1.000E+03  100.000 ! "(1pe10.3,1x,f8.3)"
 10.00E+02 1000.000 ! "(2pe10.3,1x,f8.3)"


Thanks and keep up the good work!
Federico

Reply via email to