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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR33253 namelist: reading back a string, also fixed writing with delimiters.
3
! Test case modified from that of the PR by
4
! Jerry DeLisle  
5
program main
6
  implicit none
7
  character(len=3) :: a
8
  namelist /foo/ a
9
 
10
  open(10, status="scratch", delim="quote")
11
  a = 'a"a'
12
  write(10,foo)
13
  rewind 10
14
  a = ""
15
  read (10,foo) ! This gave a runtime error before the patch.
16
  if (a.ne.'a"a') call abort
17
  close (10)
18
 
19
  open(10, status="scratch", delim="apostrophe")
20
  a = "a'a"
21
  write(10,foo)
22
  rewind 10
23
  a = ""
24
  read (10,foo)
25
  if (a.ne."a'a") call abort
26
  close (10)
27
 
28
  open(10, status="scratch", delim="none")
29
  a = "a'a"
30
  write(10,foo)
31
  rewind 10
32
  a = ""
33
  read (10,foo)
34
  if (a.ne."a'a") call abort
35
  close (10)
36
end program main

powered by: WebSVN 2.1.0

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