| 1 |
! { dg-do run } |
| 2 |
! PR69668 Error reading namelist opened with DELIM='NONE' |
| 3 |
program namelist |
| 4 |
implicit none |
| 5 |
|
| 6 |
integer,parameter :: tabsz=10 |
| 7 |
integer :: i |
| 8 |
character(len=10),dimension(tabsz) :: tab |
| 9 |
namelist/tab_nml/tab |
| 10 |
|
| 11 |
tab(:)='invalid' |
| 12 |
|
| 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) |
| 20 |
|
| 21 |
read(unit=23,nml=tab_nml) |
| 22 |
|
| 23 |
close(unit=23) |
| 24 |
|
| 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 |
| 28 |
|
| 29 |
end program namelist |