https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111022
--- Comment #27 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> --- (In reply to anlauf from comment #26) > (In reply to Jerry DeLisle from comment #24) > > Currently gfortran does the following: > > > > character(20) :: fmt > > character(9) :: buffer > > fmt = "(1a1,d0.2,1a1)" > > write(buffer,fmt) ">", 3.0, "<" > > print *, buffer > > fmt = "(1a1,e0.2,1a1)" > > write(buffer,fmt) ">", 3.0, "<" > > print *, buffer > > end > > > > > > $ gfc question.f90 > > $ ./a.out > > >0.30D+1< > > >0.30E+1< > > > > Why not: > > > > $ ./a.out > > >3.00D+0< > > >3.00E+0< > > It seems the Fortran standard changed here between F2018 and F2023. > > F2018, Table 13.1: > > Ew.d |exp| ≤ 99 E±z1z2 or ±0z1 z2 > 99 < |exp| ≤ 999 ±z1 z2z3 > > So Intel implements this. > > ======== > > F2023, Table 13.1: > > Ew.d E0 or E0.d any E±z1 z2 . . . zs > Yes it changed. I am looking at a lot of different cases here as I have time and intuitively the 0.30D+1 caught my attention. Its not necessarily related to this bug. I also have the latest standard (2023) in front of me here.