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

--- Comment #2 from federico <perini at wisc dot edu> ---
Number b=10.0, so in format f8.3 it should always be output as “  10.000” ?

Federico Perini
________________________________
From: kargl at gcc dot gnu.org <gcc-bugzi...@gcc.gnu.org>
Sent: Thursday, April 18, 2019 8:46:19 PM
To: Federico Perini
Subject: [Bug fortran/90150] wrong output produced by float format fX.Y
descriptor following translated scientific format XpeY.Z

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #1 from kargl at gcc dot gnu.org ---
(In reply to federico from comment #0)
> Created attachment 46201 [details]
> 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)"
>
>

Can you explain what you think the compiler should output?

The P edit descriptor affects the entire string not just
the immediately following edit descriptor.

--
You are receiving this mail because:
You reported the bug.

Reply via email to