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_16.f90] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
!{ dg-do run }
2
! Tests namelist on complex variables
3
! provided by Paul Thomas - pault@gcc.gnu.org
4
program namelist_16
5
  complex(kind=8), dimension(2)  ::   z
6
  namelist /mynml/ z
7
  z = (/(1.0,2.0), (3.0,4.0)/)
8
 
9
  open (10, status = "scratch")
10
  write (10, '(A)') "&mynml z(1)=(5.,6.) z(2)=(7.,8.) /"
11
  rewind (10)
12
 
13
  read (10, mynml, iostat = ier)
14
  if (ier .ne. 0) call abort ()
15
  close (10)
16
 
17
  open (10, status = "scratch")
18
  write (10, mynml, iostat = ier)
19
  if (ier .ne. 0) call abort ()
20
  rewind (10)
21
 
22
  z = (/(1.0,2.0), (3.0,4.0)/)
23
  read (10, mynml, iostat = ier)
24
  if (ier .ne. 0) call abort ()
25
  close (10)
26
 
27
  if ((z(1) .ne. (5.0,6.0)) .or. (z(2) .ne. (7.0,8.0))) call abort ()
28
 
29
end program namelist_16

powered by: WebSVN 2.1.0

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