Commit 63e8b6a5 by Jerry DeLisle

re PR libfortran/34291 (Segfault in io/list_read.c handling of end conditions)

2007-11-30  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/34291
	* gfortran.dg/namelist_41.f90: New test.

From-SVN: r130549
parent 3c55599b
2007-11-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/34291
* gfortran.dg/namelist_41.f90: New test.
2007-11-30 Tom Tromey <tromey@redhat.com> 2007-11-30 Tom Tromey <tromey@redhat.com>
PR preprocessor/32868: PR preprocessor/32868:
! { dg-do run }
! PR34291 Segfault on &end in namelist expanded read of character
implicit none
character(len=10), dimension(2) :: var
namelist /inx/ var
var = "goodbye"
open(unit=11, status='scratch')
write (11, *) "&inx"
write (11, *) "var(1)='hello'"
write (11, *) "&end"
rewind (11)
read(11,nml=inx)
if (var(1) /= 'hello' .and. var(2) /= 'goodbye') call abort
var = "goodbye"
rewind (11)
write (11, *) "$inx"
write (11, *) "var(1)='hello'"
write (11, *) "$end"
rewind (11)
read(11,nml=inx)
if (var(1) /= 'hello' .and. var(2) /= 'goodbye') call abort
end
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