2 ! PR libfortran/52512 - Cannot match namelist object name
3 ! Test case derived from PR.
11 character(len
= 8) :: sname
!: short name
12 logical :: lini
!: read in a file or not
14 type(ptracer
) , dimension(3) :: tracer
15 namelist/namtoptrc
/ getal
,tracer
20 tracer(jn
)%sname
= 'default_name'
21 tracer(jn
)%lini
= .false
.
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."
32 read(10, nml
=namtoptrc
)
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