2 ! PR30918 Failure to skip commented out NAMELIST
3 ! Before the patch, this read the commented out namelist and iuse would
4 ! equal 2 when done. Test case from PR.
7 integer :: iuse
= 0, ios
8 integer, parameter :: nmlunit
= 10 ! Namelist unit
12 character(len
=12) :: type, use
14 namelist /REPORT
/ type, use, max_proc
16 ! Set up the test file
18 open(unit
=nmlunit
, status
="scratch")
19 write(nmlunit
, '(a)') "!================"
20 write(nmlunit
, '(a)') "! Namelist REPORT"
21 write(nmlunit
, '(a)') "!================"
22 write(nmlunit
, '(a)') "! &REPORT use = 'ignore' / ! Comment"
23 write(nmlunit
, '(a)') "!"
24 write(nmlunit
, '(a)') " &REPORT type = 'SYNOP'"
25 write(nmlunit
, '(a)') " use = 'active'"
26 write(nmlunit
, '(a)') " max_proc = 20"
27 write(nmlunit
, '(a)') " /"
29 !-------------------------------------
30 ! Loop to read namelist multiple times
31 !-------------------------------------
33 !----------------------------------------
34 ! Preset namelist variables with defaults
35 !----------------------------------------
42 read (nmlunit
, nml
=REPORT
, iostat
=ios
)
46 if (iuse
/= 1) call abort()