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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [namelist_18.f90] - Blame information for rev 708

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

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

powered by: WebSVN 2.1.0

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