re PR fortran/40638 (RTE: "Unit number in I/O statement too large" -- fails with any low value)

2009-07-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/40638
	* gfortran.dg/unit_1.f90: New test.

From-SVN: r149219
This commit is contained in:
Jerry DeLisle 2009-07-04 04:05:19 +00:00
parent dfb5d635c7
commit 248f54ffe1
2 changed files with 29 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2009-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/40638
* gfortran.dg/unit_1.f90: New test.
2009-06-30 Jakub Jelinek <jakub@redhat.com>
PR c++/40566

View File

@ -0,0 +1,24 @@
! { dg-do run }
! PR40638 Run Time Error: Unit number in I/O statement too large
program main
integer(kind=2) :: lun, anum
integer(kind=1) :: looney, bin
lun = 12
anum = 5
looney = 42
bin = 23
open (lun, status='scratch')
write(lun,*) anum
anum = 0
rewind(lun)
read (lun, *) anum
if (anum.ne.5) call abort
open (looney, status='scratch')
write(looney,*)bin
bin = 0
rewind (looney)
read (looney,*)bin
if (bin.ne.23) call abort
close (lun)
close (looney)
end