2 ! This tests the fix for PR22010, where namelists were not being written to
3 ! and read back from modules. It has two namelists: one that is USE
4 ! associated and another that is concatenated by USE and host association.
6 ! Contributed by Paul Thomas pault@gcc.gnu.org
12 namelist /nml1/ aa, ii, rr
18 namelist /nml2/ ii, rrr ! Concatenate use and host associated variables.
19 open (10, status="scratch")
20 write (10,*) "&NML1 aa='lmno' ii=1 rr=2.5 /"
21 write (10,*) "&NML2 aa='pqrs' ii=2 rrr=3.5 /"
23 read (10,nml=nml1,iostat=i)
24 if ((i.ne.0).or.(aa.ne."lmno").or.(ii.ne.1).or.(rr.ne.2.5)) call abort ()
26 read (10,nml=nml2,iostat=i)
27 if ((i.ne.0).or.(aa.ne."pqrs").or.(ii.ne.2).or.(rrr.ne.3.5)) call abort ()
30 end program namelist_use