| 1 |
! { dg-do run } |
| 2 |
! PR36582 Namelist I/O error: Bogus "Cannot match namelist object" |
| 3 |
! Test case derived from PR. |
| 4 |
module mod1 |
| 5 |
|
| 6 |
type screen_io_type |
| 7 |
integer :: begin |
| 8 |
end type screen_io_type |
| 9 |
|
| 10 |
type adjoint_type |
| 11 |
type(screen_io_type) :: screen_io_fs_ntime |
| 12 |
character(12) :: solver_type |
| 13 |
end type adjoint_type |
| 14 |
|
| 15 |
type(adjoint_type) :: adjoint |
| 16 |
namelist/info_adjoint/adjoint |
| 17 |
|
| 18 |
end module mod1 |
| 19 |
|
| 20 |
program gfortran_error_2 |
| 21 |
use mod1 |
| 22 |
adjoint%solver_type = "abcdefghijkl" |
| 23 |
open(31,status='scratch') |
| 24 |
write(31, '(a)') "&info_adjoint" |
| 25 |
write(31, '(a)') "adjoint%solver_type = 'direct'" |
| 26 |
write(31, '(a)') "adjoint%screen_io_fs_ntime%begin = 42" |
| 27 |
write(31, '(a)') "/" |
| 28 |
rewind(31) |
| 29 |
read(31,nml=info_adjoint) |
| 30 |
if (adjoint%solver_type /= 'direct') STOP 1 |
| 31 |
if (adjoint%screen_io_fs_ntime%begin /= 42) STOP 2 |
| 32 |
end program gfortran_error_2 |