[Patch, libgfortran] FIX PR26509 Catch EOR on DIRECT access write

Jerry DeLisle jvdelisle@verizon.net
Mon Mar 13 08:23:00 GMT 2006


: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



More information about the Fortran mailing list