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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [namelist_13.f90] - Blame information for rev 816

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

Line No. Rev Author Line
1 302 jeremybenn
!{ dg-do run }
2
! Tests simple derived types.
3
! Provided by Paul Thomas - pault@gcc.gnu.org
4
 
5
program namelist_13
6
 
7
  type                        ::      yourtype
8
    integer, dimension(2)     ::      yi = (/8,9/)
9
    real, dimension(2)        ::      yx = (/80.,90./)
10
    character(len=2)          ::      ych = "xx"
11
  end type yourtype
12
 
13
  type                        ::      mytype
14
    integer, dimension(2)     ::      myi = (/800,900/)
15
    real, dimension(2)        ::      myx = (/8000.,9000./)
16
    character(len=2)          ::      mych = "zz"
17
    type(yourtype)            ::      my_yourtype
18
  end type mytype
19
 
20
  type(mytype)                ::      z
21
  integer                     ::      ier
22
  integer                     ::      zeros(10)
23
  namelist /mynml/ zeros, z
24
 
25
  zeros = 0
26
  zeros(5) = 1
27
 
28
  open(10,status="scratch", delim="apostrophe")
29
  write (10, nml=mynml, iostat=ier)
30
  if (ier.ne.0) call abort
31
 
32
  rewind (10)
33
  read (10, NML=mynml, IOSTAT=ier)
34
  if (ier.ne.0) call abort
35
  close (10)
36
 
37
end program namelist_13
38
 

powered by: WebSVN 2.1.0

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