libgfortran/ChangeLog:
[official-gcc.git] / gcc / testsuite / gfortran.dg / namelist_84.f90
blobaf139d91edc9f99b375f9ff67d066ea28d5a9c01
1 ! { dg-do run }
2 program namelist_delim_none
3 implicit none
4 character(512) :: internal_unit
5 character(5), dimension(5) :: mystring
6 real, dimension(4) :: somenum
7 integer :: i
8 namelist /mylist/ mystring, somenum
9 mystring(1)='mon'
10 mystring(2)='tue'
11 mystring(3)='wed'
12 mystring(4)='thu'
13 mystring(5)='fri'
14 somenum = reshape(source = (/ 2, 3, 5, 7 /), shape=shape(somenum))
16 open(unit=10,status='scratch',delim='none')
17 write(10, mylist)
18 rewind(10)
19 mystring = "xxxxx"
20 read(10,mylist)
21 if (any(mystring /= (/ 'mon', 'tue', 'wed', 'thu', 'fri' /))) call abort
22 rewind(10)
23 do i=1,5
24 read(10,'(a)') internal_unit
25 if (scan(internal_unit,"""'").ne.0) call abort
26 end do
27 close(10)
28 end program