https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90374
--- Comment #30 from Thomas Henlich <thenlich+gccbug at gmail dot com> --- (In reply to Jerry DeLisle from comment #29) > I think this last patch above fixes the last adjustment needed. I could be > wrong I suppose. Is this ready to close? Jerry, thanks for the good work so far! But I found this issue: ==== program test write(*, "(g0.2)") 0.1e-9 write(*, "(g8.2)") 0.1e-9 write(*, "(g0.2)") 0.1e123_10 write(*, "(g8.2)") 0.1e123_10 end ==== Output from GCC 9.2.0: ==== 0.10E-09 0.10E-09 0.10E+0123 0.10+123 ==== I think this is correct, according to the table from the standard F2008/F2018 (see my comment #23 above) Now after these patches, I get something different: ==== 0.10E-9 0.10E-09 0.10E+123 0.10+123 ==== With G0.d" (and starting with F2018 with E0.d, D0.d, EN0.d, ES0.d etc. likewise), the processor is only allowed to remove leading/trailing spaces ("select ... actual field width"). It is not allowed to change the exponent format in this case. This would only be the case if E...e0" editing is explicitly requested.