PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gfortran.dg / namelist_90.f
blobdfa80b12d91d6a2a43a1d903f73a66f4e412eef4
1 ! { dg-do run }
2 ! PR71123 Namelist read failure on Windows
3 implicit none
4 integer :: i, ierr
5 real(8), dimension(30) :: senid, res
6 character(2) :: crlf = char(13) // char(10)
7 namelist /fith/ senid
8 do i=1,30
9 res(i) = i
10 enddo
11 senid = 99.0
12 open(unit=7,file='test.out',form='formatted',
13 * status='new',action='readwrite', access='stream')
14 write(7,'(a)') "&fith" // crlf
15 write(7,'(a)') "senid= 1.0 , 2.0 , 3.0 , 4.0 , 5.0 ," // crlf
16 write(7,'(a)') "6.0 , 7.0 , 8.0 , 9.0 , 10.0 , 11.0 ," // crlf
17 write(7,'(a)') "12.0 , 13.0 , 14.0 , 15.0 , 16.0 , 17.0 ," // crlf
18 write(7,'(a)') "18.0 , 19.0 , 20.0 , 21.0 , 22.0 , 23.0 ," // crlf
19 write(7,'(a)') "24.0 , 25.0 , 26.0 , 27.0 , 28.0 , 29.0 ," // crlf
20 write(7,'(a)') "30.0 ," // crlf
21 write(7,'(a)') "/" // crlf
22 close(7)
23 open(unit=7,file='test.out',form='formatted')
24 read(7,nml=fith, iostat=ierr)
25 close(7, status="delete")
26 if (ierr.ne.0) STOP 1
27 if (any(senid.ne.res)) STOP 2
28 end