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) call abort
36 if (tracer(1)%sname
/= 'DIC ') call abort
37 if (tracer(2)%sname
/= 'Alkalini') call abort
38 if (tracer(3)%sname
/= 'O2 ') call abort
39 if (.not
. tracer(1)%lini
) call abort
40 if (.not
. tracer(2)%lini
) call abort
41 if (.not
. tracer(3)%lini
) call abort