URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [advance_6.f90] - Rev 801
Go to most recent revision | Compare with Previous | Blame | View Log
! { dg-do run { target fd_truncate } }! PR 34370 - file positioning after non-advancing I/O didn't add! a record marker.program mainimplicit nonecharacter(len=3) :: ccharacter(len=80), parameter :: fname = "advance_backspace_1.dat"call write_fileclose (95)call check_end_recordcall write_filebackspace 95c = 'xxx'read (95,'(A)') cif (c /= 'ab ') call abortclose (95)call check_end_recordcall write_filebackspace 95close (95)call check_end_recordcall write_fileendfile 95close (95)call check_end_recordcall write_fileendfile 95rewind 95c = 'xxx'read (95,'(A)') cif (c /= 'ab ') call abortclose (95)call check_end_recordcall write_filerewind 95c = 'xxx'read (95,'(A)') cif (c /= 'ab ') call abortclose (95)call check_end_recordcontainssubroutine write_fileopen(95, file=fname, status="replace", form="formatted")write (95, '(A)', advance="no") 'a'write (95, '(A)', advance="no") 'b'end subroutine write_file! Checks for correct end record, then deletes the file.subroutine check_end_recordcharacter(len=1) :: xopen(2003, file=fname, status="old", access="stream", form="unformatted")read(2003) xif (x /= 'a') call abortread(2003) xif (x /= 'b') call abortread(2003) xif (x /= achar(10)) thenread(2003) xif (x /= achar(13)) thenelsecall abortend ifend ifclose(2003,status="delete")end subroutine check_end_recordend program main
Go to most recent revision | Compare with Previous | Blame | View Log
