Merge from mainline.
[official-gcc.git] / gcc / testsuite / gfortran.dg / write_0_pe_format.f90
blob3890c32ecc0204a1a91c4929a68c626f13c05dd3
1 ! { dg-do run }
2 ! PR libfortran/20101
3 ! With format "PE", 0.0 must still have "+00" as exponent
4 character(len=10) :: c1, c2
5 write(c1,"(1pe9.2)") 0.0
6 write(c2,"(1pe9.2)") 1.0
7 if (trim(adjustl(c1)) .ne. "0.00E+00") call abort()
8 if (trim(adjustl(c2)) .ne. "1.00E+00") call abort()
9 end