PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / namelist_88.f90
blobff61551828b46c87988d7d9d0fdea330ebb9d4d9
1 ! { dg-do run }
2 ! PR69668 Error reading namelist opened with DELIM='NONE'
3 program namelist
4 implicit none
6 integer,parameter :: tabsz=10
7 integer :: i
8 character(len=10),dimension(tabsz) :: tab
9 namelist/tab_nml/tab
11 tab(:)='invalid'
13 ! Create a temporary test namelist file
14 open(unit=23,status='scratch',delim='none')
15 write(23,*) "&tab_nml"
16 write(23,*) "tab(1)='in1',"
17 write(23,*) "tab(2)='in2'"
18 write(23,*) "/"
19 rewind(23)
21 read(unit=23,nml=tab_nml)
23 close(unit=23)
25 if (tab(1).ne.'in1') STOP 1
26 if (tab(2).ne.'in2') STOP 2
27 if (any(tab(3:tabsz).ne.'invalid')) STOP 3
29 end program namelist