re PR fortran/36582 (Namelist I/O error: Bogus "Cannot match namelist object")

2008-07-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/36852
	* gfortran.dg/namelist_52.f90: New test.

From-SVN: r138073
This commit is contained in:
Jerry DeLisle 2008-07-23 04:36:54 +00:00
parent ac834957b9
commit 5295185c31
2 changed files with 37 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2008-07-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/36852
* gfortran.dg/namelist_52.f90: New test.
2008-07-22 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
* lib/target-supports.exp (check_effective_target_spu_auto_overlay):

View File

@ -0,0 +1,32 @@
! { dg-do run }
! PR36582 Namelist I/O error: Bogus "Cannot match namelist object"
! Test case derived from PR.
module mod1
type screen_io_type
integer :: begin
end type screen_io_type
type adjoint_type
type(screen_io_type) :: screen_io_fs_ntime
character(12) :: solver_type
end type adjoint_type
type(adjoint_type) :: adjoint
namelist/info_adjoint/adjoint
end module mod1
program gfortran_error_2
use mod1
adjoint%solver_type = "abcdefghijkl"
open(31,status='scratch')
write(31, '(a)') "&info_adjoint"
write(31, '(a)') "adjoint%solver_type = 'direct'"
write(31, '(a)') "adjoint%screen_io_fs_ntime%begin = 42"
write(31, '(a)') "/"
rewind(31)
read(31,nml=info_adjoint)
if (adjoint%solver_type /= 'direct') call abort
if (adjoint%screen_io_fs_ntime%begin /= 42) call abort
end program gfortran_error_2