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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gfortran.dg/] [namelist_17.f90] - Blame information for rev 20

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

Line No. Rev Author Line
1 12 jlechner
!{ dg-do run }
2
! Tests namelist on logical variables
3
! provided by Paul Thomas - pault@gcc.gnu.org
4
 
5
program namelist_17
6
  logical, dimension(2)        ::   l
7
  namelist /mynml/ l
8
  l = (/.true., .false./)
9
 
10
  open (10, status = "scratch")
11
  write (10, '(A)') "&mynml l = F T /"
12
  rewind (10)
13
 
14
  read (10, mynml, iostat = ier)
15
  if (ier .ne. 0) call abort ()
16
  close (10)
17
 
18
  open (10, status = "scratch")
19
  write (10, mynml, iostat = ier)
20
  if (ier .ne. 0) call abort ()
21
  rewind (10)
22
 
23
  l = (/.true., .false./)
24
  read (10, mynml, iostat = ier)
25
  if (ier .ne. 0) call abort ()
26
  close (10)
27
 
28
  if (l(1) .or. (.not.l(2))) call abort ()
29
 
30
end program namelist_17

powered by: WebSVN 2.1.0

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