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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR42901  Reading array of structures from namelist
3
! Test case derived from the reporters test case.
4
program test_nml
5
type field_descr
6
  integer number
7
end type
8
type fsetup
9
  type (field_descr), dimension(3) :: vel ! 3 velocity components
10
end type
11
type (fsetup) field_setup
12
namelist /nl_setup/ field_setup
13
field_setup%vel%number = 0
14
! write(*,nml=nl_setup)
15
open(10, status="scratch")
16
write(10,'(a)') "&nl_setup"
17
write(10,'(a)') " field_setup%vel(1)%number=  3,"
18
write(10,'(a)') " field_setup%vel(2)%number=  9,"
19
write(10,'(a)') " field_setup%vel(3)%number=  27,"
20
write(10,'(a)') "/"
21
rewind(10)
22
read(10,nml=nl_setup)
23
if (field_setup%vel(1)%number .ne. 3) call abort
24
if (field_setup%vel(2)%number .ne. 9) call abort
25
if (field_setup%vel(3)%number .ne. 27) call abort
26
! write(*,nml=nl_setup)
27
end program test_nml

powered by: WebSVN 2.1.0

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