2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / fmt_f0_2.f90
blob4afba91389e3c5dd36d6f08cecfebb4c203efdd9
1 ! { dg-do run }
2 ! PR77393
3 program testbigf0 ! Can enormous numbers be printed with F0.0 format?
4 use ISO_FORTRAN_ENV
5 implicit none
6 integer i
7 integer, parameter :: j(size(real_kinds)+4)=[REAL_KINDS, [4, 4, 4, 4]]
8 character(10000) :: str
10 do i=1,size(real_kinds)
11 select case (i)
12 case (1)
13 write(str, "(f0.0)") -huge(real(1.0,kind=j(1)))
14 case (2)
15 write(str, "(f0.0)") -huge(real(1.0,kind=j(2)))
16 case (3)
17 write(str, "(f0.0)") -huge(real(1.0,kind=j(3)))
18 case (4)
19 write(str, "(f0.10)") -huge(real(1.0,kind=j(4)))
20 end select
21 enddo
22 end program testbigf0