backport: re PR fortran/45532 (gfortran namelist read error)

2010-09-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	Backport from mainline
	PR libfortran/45532
	* gfortran.dg/namelist_64.f90: New test.

From-SVN: r164547
This commit is contained in:
Jerry DeLisle 2010-09-23 01:21:10 +00:00
parent 55b19b39e8
commit 585b607776
2 changed files with 33 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2010-09-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from mainline
PR libfortran/45532
* gfortran.dg/namelist_64.f90: New test.
2010-09-22 Eric Botcazou <ebotcazou@adacore.com>
* gcc.target/sparc/mnofpu.c: New test.

View File

@ -0,0 +1,27 @@
! { dg-do run }
! PR45532 gfortran namelist read error.
! Derived from the original test case by David Sagan.
program test
implicit none
type line_struct
integer :: width = 10
end type
type symbol_struct
integer :: typee = 313233
end type
type curve_struct
type (line_struct) line
type (symbol_struct) symbol
end type
type (curve_struct) curve(10)
namelist / params / curve
!
open (10, status="scratch")
write(10,*) "&params"
write(10,*) " curve(1)%symbol%typee = 1234"
write(10,*) "/"
rewind(10)
read (10, nml = params)
if (curve(1)%symbol%typee /= 1234) call abort
close(10)
end program