OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [namelist_38.f90] - Blame information for rev 302

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 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.