This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, libgfortran] FIX PR26509 Catch EOR on DIRECT access write
- From: Jerry DeLisle <jvdelisle at verizon dot net>
- Cc: Fortran List <fortran at gcc dot gnu dot org>
- Date: Mon, 13 Mar 2006 00:21:56 -0800
- Subject: Re: [Patch, libgfortran] FIX PR26509 Catch EOR on DIRECT access write
- References: <4414F60E.9090100@verizon.net>
:REVIEWPATCH:
Jerry DeLisle wrote:
Note: The attached test case tests both catching the error and jumping
past an abort as well as not catching it and getting the error message.
I don't have the dg stuff quite right in the test case. Would someone help me
with this? I am trying to verify the runtime error.
! { dg-do run }
! PR26509 : Writing beyond fixed length direct access records.
! Test case derived from PR.
! Submitted by Jerry Delisle <jvdelisle@gcc.gnu.org>.
program testrecl
implicit none
open(unit = 10, form = 'unformatted', access = 'direct', recl = 4)
write(unit=10,rec=1, err=100) 1d0
call abort()
100 continue
write(unit=10,rec=1) 1d0 ! { dg-error "*Write exceeds length of DIRECT
access record*" }
close(unit=10, status='delete')
end