AArch64: correct constraint on Upl early clobber alternatives
[official-gcc.git] / gcc / testsuite / gfortran.dg / namelist_60.f90
blobe0d45d62bc6ede23cf131d73757814531143587c
1 ! { 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) STOP 1
24 if (field_setup%vel(2)%number .ne. 9) STOP 2
25 if (field_setup%vel(3)%number .ne. 27) STOP 3
26 ! write(*,nml=nl_setup)
27 end program test_nml