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 ! Concatenate use and host associated variables - an extension.
19 namelist /nml2
/ ii
, rrr
! { dg-warning "already is USE associated" }
20 open (10, status
="scratch")
21 write (10,*) "&NML1 aa='lmno' ii=1 rr=2.5 /"
22 write (10,*) "&NML2 aa='pqrs' ii=2 rrr=3.5 /"
24 read (10,nml
=nml1
,iostat
=i
)
25 if ((i
.ne
.0).or
.(aa
.ne
."lmno").or
.(ii
.ne
.1).or
.(rr
.ne
.2.5)) call abort ()
27 read (10,nml
=nml2
,iostat
=i
)
28 if ((i
.ne
.0).or
.(aa
.ne
."pqrs").or
.(ii
.ne
.2).or
.(rrr
.ne
.3.5)) call abort ()
31 end program namelist_use