| 1 |
! { dg-do run } |
| 2 |
! PR36676 Namelist comment problems |
| 3 |
! test case from PR, reduced by Jerry DeLisle <[email protected]> |
| 4 |
program mem_nml |
| 5 |
implicit none |
| 6 |
integer, save :: nxc |
| 7 |
nxc = 0 |
| 8 |
call readNamelist() |
| 9 |
contains |
| 10 |
subroutine readNamelist() |
| 11 |
implicit none |
| 12 |
namelist /INPUT/ nxc |
| 13 |
open(unit = 101, status="scratch") |
| 14 |
write(101,'(a)')"&INPUT" |
| 15 |
write(101,'(a)')"" |
| 16 |
write(101,'(a)')"!" |
| 17 |
write(101,'(a)')"!" |
| 18 |
write(101,'(a)')"!" |
| 19 |
write(101,'(a)')"nxc = 100" |
| 20 |
write(101,'(a)')"&END" |
| 21 |
rewind(101) |
| 22 |
read(unit = 101, nml = INPUT) |
| 23 |
if (nxc /= 100) STOP 1 |
| 24 |
close(unit = 101) |
| 25 |
endsubroutine |
| 26 |
end program mem_nml |
| 27 |
|