Debian Codegraph @

gcc/testsuite/gfortran.dg/pr88169_1.f90

raw
1 ! { dg-do run }
2 module foo_nml
3 implicit none
4 real :: x = -1
5 namelist /foo/ x
6 end module
7
8 program main
9 use foo_nml, only: bar => foo, x
10 implicit none
11 integer fd
12 x = 42
13 open(newunit=fd, file='tmp.dat', status='replace')
14 write(fd,nml=bar)
15 close(fd)
16 open(newunit=fd, file='tmp.dat', status='old')
17 read(fd,nml=bar)
18 if (x /= 42) stop 1
19 close(fd)
20 end program
21 ! { dg-final { cleanup-modules "foo_nml" } }