coarray_41.f90: Add "-latomic" option if libatomic_available.
[official-gcc.git] / gcc / testsuite / gfortran.dg / namelist_88.f90
blob0a6ac9b3bb3344a19c48e40373a2eaf56de0aeb0
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') call abort
26 if (tab(2).ne.'in2') call abort
27 if (any(tab(3:tabsz).ne.'invalid')) call abort
29 end program namelist