gcc/testsuite/gfortran.dg/pr59440-1.f90
raw| 1 | ! PR fortran/59440 |
| 2 | ! { dg-do compile } |
| 3 | ! { dg-options "-O2 -g" } |
| 4 | |
| 5 | module pr59440 |
| 6 | implicit none |
| 7 | type t |
| 8 | integer :: grid = 0 |
| 9 | end type t |
| 10 | contains |
| 11 | subroutine read_nml (nnml, s) |
| 12 | integer, intent(in) :: nnml |
| 13 | type(t), intent(out) :: s |
| 14 | integer :: grid |
| 15 | namelist /N/ grid |
| 16 | call read_nml_type_2 |
| 17 | s%grid = grid |
| 18 | contains |
| 19 | subroutine read_nml_type_2 |
| 20 | read (nnml, nml=N) |
| 21 | end subroutine read_nml_type_2 |
| 22 | end subroutine read_nml |
| 23 | end module pr59440 |