https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111022
--- Comment #15 from john.harper at vuw dot ac.nz --- My previous test program tried Ex0.0E0 output but not Ex0.0, where x is N,S, or absent. Below is a revised version which includes all 6 cases. It also tries EN and ES before trying E, with an error stop if an error is detected. Below the program is its output from ifort, which I think is f2018-compliant, compiled with options -standard-semantics -check all (All lines of gfortran output after the first appeared to be wrong.) program testen0es0e0 ! EN0.0,ES0.0 good f2018, E0.0 bad, with E0 or not integer,parameter::p1 = kind(1e0), p2 = kind(1d0), & p3 = selected_real_kind(precision(1.0_p2)+1), & hp = selected_real_kind(precision(1.0_p3)+1), & p4 = merge(hp,p3,hp>0) ! in gfortran p4 /= p3, in ifort p4 == p3 character:: ens(3)*2=["EN","ES"," E"],e0(2)*2=[" ","E0"], fmt*14, & msg*200 integer iens,ie0,ios write(*,"(A,4(1X,I0))") 'real kinds',p1,p2,p3,p4 do iens = 1,3 do ie0 = 1,2 fmt = "(A,1X,"//ens(iens)//"0.0"//e0(ie0)//")" write(*, fmt,iostat=ios,iomsg=msg) 'With '//fmt, 666.0_p1 if(ios/=0) error stop trim(msg) write(*, fmt) 'With '//fmt, 666.0_p2 write(*, fmt) 'With '//fmt, 666.0_p3 if(p3/=p4) write(*, fmt) 'With '//fmt, 666.0_p4 end do end do end program testen0es0e0 real kinds 4 8 16 16 With (A,1X,EN0.0 ) 666.E+00 With (A,1X,EN0.0 ) 666.E+00 With (A,1X,EN0.0 ) 666.E+00 With (A,1X,EN0.0E0) 666.E+0 With (A,1X,EN0.0E0) 666.E+0 With (A,1X,EN0.0E0) 666.E+0 With (A,1X,ES0.0 ) 7.E+02 With (A,1X,ES0.0 ) 7.E+02 With (A,1X,ES0.0 ) 7.E+02 With (A,1X,ES0.0E0) 7.E+2 With (A,1X,ES0.0E0) 7.E+2 With (A,1X,ES0.0E0) 7.E+2 With (A,1X, E0.0 ) ***************************************** output conversion error, unit 6, file /dev/pts/0 -- John Harper, School of Mathematics and Statistics Victoria Univ. of Wellington, PO Box 600, Wellington 6140, New Zealand. e-mail john.har...@vuw.ac.nz