fix pr/45972
[official-gcc.git] / gcc / testsuite / gfortran.dg / fmt_f0_1.f90
blob166846b87fe6dd06dbd599994bd135cca5c8fe14
1 ! { dg-do run )
2 ! PR39304 write of 0.0 with F0.3 gives **
3 ! Test case developed from case provided by reporter.
4 REAL :: x
5 CHARACTER(80) :: str
6 x = 0.0
7 write (str,'(f0.0)') x
8 if (str.ne."0.") call abort
9 write (str,'(f0.1)') x
10 if (str.ne."0.0") call abort
11 write (str,'(f0.2)') x
12 if (str.ne."0.00") call abort
13 write (str,'(f0.3)') x
14 if (str.ne."0.000") call abort
15 write (str,'(f0.4)') x
16 if (str.ne."0.0000") call abort
17 END