| 1 |
! { dg-do compile } |
| 2 |
! PR fortran/116530 - ICE with member of namelist renamed by use module |
| 3 |
! |
| 4 |
! Reported by philippe.wautelet at cnrs.fr |
| 5 |
|
| 6 |
module mod_nml1 |
| 7 |
implicit none |
| 8 |
logical :: ldiag |
| 9 |
namelist /nam_nml1/ldiag |
| 10 |
end module mod_nml1 |
| 11 |
|
| 12 |
module mod_interm |
| 13 |
use mod_nml1 |
| 14 |
end module mod_interm |
| 15 |
|
| 16 |
program ice_nml |
| 17 |
use mod_nml1, ldiag_nml1 => ldiag |
| 18 |
use mod_nml1, only : ldiag_only => ldiag |
| 19 |
use mod_interm |
| 20 |
implicit none |
| 21 |
integer :: ilu = 10 |
| 22 |
read(unit=ilu,nml=nam_nml1) |
| 23 |
write(unit=*,nml=nam_nml1) |
| 24 |
print *, ldiag |
| 25 |
print *, ldiag_nml1 |
| 26 |
print *, ldiag_only |
| 27 |
end program ice_nml |