diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2007-11-30 23:21:48 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2007-11-30 23:21:48 +0000 |
commit | 63e8b6a5658a5d4c9bc47b3ba58edf0be1f19282 (patch) | |
tree | 60a4c5778b294442eff16a0b3894e7786428ffd3 | |
parent | 3c55599b1fd688ef422637e772791aa953c6c7fc (diff) | |
download | gcc-63e8b6a5658a5d4c9bc47b3ba58edf0be1f19282.zip gcc-63e8b6a5658a5d4c9bc47b3ba58edf0be1f19282.tar.gz gcc-63e8b6a5658a5d4c9bc47b3ba58edf0be1f19282.tar.bz2 |
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
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/namelist_41.f90 | 22 |
2 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8c1cf61..3c09a8d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +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> PR preprocessor/32868: diff --git a/gcc/testsuite/gfortran.dg/namelist_41.f90 b/gcc/testsuite/gfortran.dg/namelist_41.f90 new file mode 100644 index 0000000..2d9a71a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/namelist_41.f90 @@ -0,0 +1,22 @@ +! { 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 |