PR target/83368
[official-gcc.git] / gcc / testsuite / gfortran.dg / fmt_f0_3.f90
blob905fe73b6f61c806e0d90b28c3b73ca99c96575b
1 ! { dg-do run }
2 ! PR77393, this segfaulted before
3 program testbigf0
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, "(f8.0)") huge(real(1.0,kind=j(1)))
14 case (2)
15 write(str, "(f18.0)") huge(real(1.0,kind=j(2)))
16 case (3)
17 write(str, "(f20.0)") huge(real(1.0,kind=j(3)))
18 case (4)
19 write(str, "(f40.0)") huge(real(1.0,kind=j(4)))
20 end select
21 enddo
22 end program testbigf0