OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [namelist_18.f90] - Blame information for rev 154

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
!{ dg-do run }
2
! Tests character delimiters for namelist write
3
! provided by Paul Thomas - pault@gcc.gnu.org
4
 
5
program namelist_18
6
  character*3        ::   ch = "foo"
7
  character*80       ::   buffer
8
  namelist /mynml/ ch
9
 
10
  open (10, status = "scratch")
11
  write (10, mynml)
12
  rewind (10)
13
  read (10, '(a)', iostat = ier) buffer
14
  read (10, '(a)', iostat = ier) buffer
15
  if (ier .ne. 0) call abort ()
16
  close (10)
17
  If ((buffer(5:5) /= "f") .or. (buffer(9:9) /= " ")) call abort ()
18
 
19
  open (10, status = "scratch", delim ="quote")
20
  write (10, mynml)
21
  rewind (10)
22
  read (10, '(a)', iostat = ier) buffer
23
  read (10, '(a)', iostat = ier) buffer
24
  if (ier .ne. 0) call abort ()
25
  close (10)
26
  If ((buffer(5:5) /= """") .or. (buffer(9:9) /= """")) call abort ()
27
 
28
  open (10, status = "scratch", delim ="apostrophe")
29
  write (10, mynml)
30
  rewind (10)
31
  read (10, '(a)', iostat = ier) buffer
32
  read (10, '(a)', iostat = ier) buffer
33
  if (ier .ne. 0) call abort ()
34
  close (10)
35
  If ((buffer(5:5) /= "'") .or. (buffer(9:9) /= "'")) call abort ()
36
 
37
end program namelist_18

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.