re PR libfortran/33253 (namelist: reading back a string with apostrophe)

2007-09-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/33253
	* gfortran.dg/namelist_15.f90: Update test.
	* gfortran.dg/namelist_24.f90: Update test.
	* gfortran.dg/namelist_38.f90: New test.

From-SVN: r128056
This commit is contained in:
Jerry DeLisle 2007-09-03 19:27:48 +00:00
parent 8d5c5e35a7
commit ae6cd761c4
4 changed files with 26 additions and 2 deletions

View file

@ -1,3 +1,10 @@
2007-09-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/33253
* gfortran.dg/namelist_15.f90: Update test.
* gfortran.dg/namelist_24.f90: Update test.
* gfortran.dg/namelist_38.f90: New test.
2007-09-03 H.J. Lu <hongjiu.lu@intel.com>
* gcc.dg/vect/no-tree-scev-cprop-vect-iv-1.c: Restored. Moved

View file

@ -20,7 +20,7 @@ program namelist_15
namelist /mynml/ x
open (10, status = "scratch")
open (10, status = "scratch", delim='apostrophe')
write (10, '(A)') "&MYNML"
write (10, '(A)') " x = 3, 4, 'dd', 'ee', 'ff', 'gg',"
write (10, '(A)') " 4, 5, 'hh', 'ii', 'jj', 'kk',"

View file

@ -11,7 +11,7 @@
character*(8) names2(nd,nd)
character*(8) names3(nd,nd)
namelist / mynml / names, names2, names3
open(unit=20,status='scratch')
open(unit=20,status='scratch', delim='apostrophe')
write (20, '(a)') "&MYNML"
write (20, '(a)') "NAMES = 25*'0'"
write (20, '(a)') "NAMES2 = 25*'0'"

View file

@ -0,0 +1,17 @@
! { dg-do run }
! PR33253 namelist: reading back a string
! Test case modified from that of the PR by
! Jerry DeLisle <jvdelisle@gcc.gnu.org>
program main
implicit none
character(len=8) :: a
namelist /foo/ a
open(10, status="scratch")
a = "a'a"
write(10,foo)
rewind 10
a = ""
read (10,foo) ! This gave a runtime error before the patch.
if (a.ne."a'a") call abort
close (10)
end program main