Commit 7f4cc3ce by Jerry DeLisle

re PR fortran/69668 (Error reading namelist opened with DELIM='NONE')

2016-02-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/69668
	* gfortran.dg/namelist_88.f90: New test.

From-SVN: r233388
parent 955ca6dc
2016-02-12 Jerry DeLisle <jvdelisle@gcc.gnu.org> 2016-02-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/69668 PR libgfortran/69668
* gfortran.dg/namelist_88.f90: New test.
2016-02-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/69668
* gfortran.dg/namelist_38.f90: Update test. * gfortran.dg/namelist_38.f90: Update test.
* gfortran.dg/namelist_84.f90: Update test. * gfortran.dg/namelist_84.f90: Update test.
......
! { dg-do run }
! PR69668 Error reading namelist opened with DELIM='NONE'
program namelist
implicit none
integer,parameter :: tabsz=10
integer :: i
character(len=10),dimension(tabsz) :: tab
namelist/tab_nml/tab
tab(:)='invalid'
! Create a temporary test namelist file
open(unit=23,status='scratch',delim='none')
write(23,*) "&tab_nml"
write(23,*) "tab(1)='in1',"
write(23,*) "tab(2)='in2'"
write(23,*) "/"
rewind(23)
read(unit=23,nml=tab_nml)
close(unit=23)
if (tab(1).ne.'in1') call abort
if (tab(2).ne.'in2') call abort
if (any(tab(3:tabsz).ne.'invalid')) call abort
end program namelist
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment