Increase timeout factor for hppa*-*-* in gcc.dg/long_branch.c
[official-gcc.git] / gcc / testsuite / gfortran.dg / namelist_79.f90
blobf63996279362b808e6a5d52bdd7e33eadafb9bb6
1 ! { dg-do run }
2 ! PR libfortran/52512 - Cannot match namelist object name
3 ! Test case derived from PR.
5 program testje
7 implicit none
9 integer :: getal, jn
10 type ptracer
11 character(len = 8) :: sname !: short name
12 logical :: lini !: read in a file or not
13 end type ptracer
14 type(ptracer) , dimension(3) :: tracer
15 namelist/namtoptrc/ getal,tracer
17 ! standard values
18 getal = 9999
19 do jn = 1, 3
20 tracer(jn)%sname = 'default_name'
21 tracer(jn)%lini = .false.
22 end do
24 open (10, status='scratch')
25 write (10, '(a)') "&namtoptrc"
26 write (10, '(a)') " getal = 7"
27 write (10, '(a)') " tracer(1) = 'DIC ', .true."
28 write (10, '(a)') " tracer(2) = 'Alkalini', .true."
29 write (10, '(a)') " tracer(3) = 'O2 ', .true."
30 write (10, '(a)') "/"
31 rewind(10)
32 read(10, nml=namtoptrc)
33 close (10)
35 if (getal /= 7) STOP 1
36 if (tracer(1)%sname /= 'DIC ') STOP 2
37 if (tracer(2)%sname /= 'Alkalini') STOP 3
38 if (tracer(3)%sname /= 'O2 ') STOP 4
39 if (.not. tracer(1)%lini) STOP 5
40 if (.not. tracer(2)%lini) STOP 6
41 if (.not. tracer(3)%lini) STOP 7
43 end program testje