1 !{ dg-do run { target fd_truncate } }
2 ! Tests character delimiters for namelist write
3 ! provided by Paul Thomas - pault@gcc.gnu.org
6 character*3 :: ch
= "foo"
10 open (10, status
= "scratch")
13 read (10, '(a)', iostat
= ier
) buffer
14 read (10, '(a)', iostat
= ier
) buffer
15 if (ier
.ne
. 0) call abort ()
17 If ((buffer(5:5) /= "f") .or
. (buffer(9:9) /= " ")) call abort ()
19 open (10, status
= "scratch", delim
="quote")
22 read (10, '(a)', iostat
= ier
) buffer
23 read (10, '(a)', iostat
= ier
) buffer
24 if (ier
.ne
. 0) call abort ()
26 If ((buffer(5:5) /= """") .or
. (buffer(9:9) /= """")) call abort ()
28 open (10, status
= "scratch", delim
="apostrophe")
31 read (10, '(a)', iostat
= ier
) buffer
32 read (10, '(a)', iostat
= ier
) buffer
33 if (ier
.ne
. 0) call abort ()
35 If ((buffer(5:5) /= "'") .or
. (buffer(9:9) /= "'")) call abort ()
37 end program namelist_18