Commit db44b39f by Jerry DeLisle

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

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

	PR libfortran/33253
	* gfortran.dg/namelist_38.f90: Update test for DELIM= .

From-SVN: r128171
parent 0be72e3a
2007-09-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/33253
* gfortran.dg/namelist_38.f90: Update test for DELIM= .
2007-09-06 Jesper Nilsson <jesper.nilsson@axis.com>
* gcc.target/cris/builtin_ctz_v3.c: New testcase.
! { dg-do run }
! PR33253 namelist: reading back a string
! PR33253 namelist: reading back a string, also fixed writing with delimiters.
! Test case modified from that of the PR by
! Jerry DeLisle <jvdelisle@gcc.gnu.org>
program main
implicit none
character(len=8) :: a
character(len=3) :: a
namelist /foo/ a
open(10, status="scratch")
a = "a'a"
open(10, status="scratch", delim="quote")
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)
open(10, status="scratch", delim="apostrophe")
a = "a'a"
write(10,foo)
rewind 10
a = ""
read (10,foo)
if (a.ne."a'a") call abort
close (10)
open(10, status="scratch", delim="none")
a = "a'a"
write(10,foo)
rewind 10
a = ""
read (10,foo)
if (a.ne."a'a") call abort
close (10)
end program main
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