Merged with mainline at revision 128810.
[official-gcc.git] / gcc / testsuite / gfortran.dg / fmt_zero_digits.f90
blobadb307155ec44965662c13b3e8a4e44692a197f6
1 ! { dg-do run }
2 ! Verify that when decimal precision is zero, no error.
3 ! Submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org>
4 program test
5 character(20) :: astr
6 50 FORMAT (d20.0)
7 astr = ""
8 write(astr,50) -8.0D0
9 if (astr.ne." -0.D+01") call abort()
10 write(astr,50) 8.0D0
11 if (astr.ne." 0.D+01") call abort()
12 end program test