summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/fmt_g0_4.f08
blob: 500117ec80f7ff74b057abb0ed971eab90a63edc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! { dg-do compile }
! { dg-options "-std=f2008" }
! PR36725 Compile time error for g0 edit descriptor
character(30) :: line
write(line, '(g0.3)') 0.1
if (line.ne."      1.000E-01") call abort
write(line, '(g0.9)') 1.0
if (line.ne."1.000000000E+00") call abort
write(line, '(g0.5)') 29.23
if (line.ne."    2.92300E+01") call abort
write(line, '(g0.8)') -28.4
if (line.ne."-2.83999996E+01") call abort
write(line, '(g0.8)') -0.0001
if (line.ne."-9.99999975E-05") call abort
end