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

--- Comment #10 from Thomas Henlich <thenlich+gccbug at gmail dot com> ---
(In reply to Jerry DeLisle from comment #5)
> Author: jvdelisle
> Date: Thu Nov 28 18:33:20 2019
> New Revision: 278817
> 
> URL: https://gcc.gnu.org/viewcvs?rev=278817&root=gcc&view=rev
> Log:
>       PR fortran/90374
>       * io.c (check_format): Allow zero width expoenent with e0.
> 
>       * io/format.c (parse_format_list): Relax format checking to allow
>       e0 exponent specifier.
> 
>       * gfortran.dg/fmt_zero_width.f90: Update test.
> 
> Modified:
>     trunk/gcc/fortran/ChangeLog
>     trunk/gcc/fortran/io.c
>     trunk/gcc/testsuite/ChangeLog
>     trunk/gcc/testsuite/gfortran.dg/fmt_zero_width.f90
>     trunk/libgfortran/ChangeLog
>     trunk/libgfortran/io/format.c
>     trunk/libgfortran/io/write_float.def

fmt_zero_width.f90:
  ..
  write (aresult,fmt="(E0.10e0)") rn
  if (aresult /= "0.3139999928E-02") stop 39

Shouldn't that be (according to Fortran 2018):
  if (aresult /= "0.3139999928E-2") stop 39

13.7.2.3.3 E and D editing
... If e is positive the exponent part contains e digits, otherwise it
contains the minimum number of digits required to represent the exponent value.
...

Reply via email to