aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/namelist_64.f90
blob: b5084e0f63c04ba22a9b5ed20f4df33c16540fe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
! { dg-do run }
! PR45532 gfortran namelist read error.
! Derived from the original test case by David Sagan.
program test
implicit none
type line_struct
  integer :: width = 10
end type
type symbol_struct
  integer :: typee = 313233
end type
type curve_struct
  type (line_struct) line
  type (symbol_struct) symbol
end type
type (curve_struct) curve(10)
namelist / params / curve
!
open (10, status="scratch")
write(10,*) "&params"
write(10,*) " curve(1)%symbol%typee = 1234"
write(10,*) "/"
rewind(10)
read (10, nml = params)
if (curve(1)%symbol%typee /= 1234) call abort
close(10)
end program