URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [read_eof_3.f90] - Rev 816
Compare with Previous | Blame | View Log
! { dg-do run }! PR25835 Check that reading from a file that is at end-of-file does not! segfault or give error. Test case derived from example in PR from Dale Ranta.! Contributed by Jerry DeLisle <jvdelisle@gcc.gnu.org>integer data(5000)data=-256open(unit=11,status='scratch', form='unformatted')write(11)datawrite(11)dataread(11,end= 1000 )datacall abort()1000 continuebackspace 11rewind 11write(11)dataread(11,end= 1001 )datacall abort()1001 continuedata = 0backspace 11rewind 11read(11,end= 1002 )dataif (.not. all(data == -256)) call abort()1002 continueread(11,end= 1003 )datacall abort()1003 continueclose(11)end
