+2014-01-11 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ * gfortran.dg/binding_label_tests_10_main.f03: Cleanup mod file.
+ * gfortran.dg/use_only_3.f90: Likewise.
+ * gfortran.dg/inquire_10.f90: Delete opened file.
+ * gfortran.dg/inquire_15.f90: Likewise.
+ * gfortran.dg/pr16597.f90: Likewise.
+ * gfortran.dg/open_negative_unit_1.f90: Likewise + test
+ for PR59419.
+
2014-01-10 Jeff Law <law@redhat.com>
PR middle-end/59743
use binding_label_tests_10 ! { dg-error "Variable one from module binding_label_tests_10 with binding label c_one at .1. uses the same global identifier as entity at .2. from module binding_label_tests_10_main" }
use binding_label_tests_10_main
end program main
+! { dg-final { cleanup-modules "binding_label_tests_10" } }
inquire(file=trim(cwd) // '/cseq',number=unit)
if (unit /= 23) call abort
+ close(unit=23, status = 'delete')
+
inquire(file='foo/../cseq2',number=unit)
if (unit >= 0) call abort
inquire(file='cseq2',number=unit)
inquire(99, stream=str)
!print *, "str=",str
if (str /= "NO") goto 10
+close(99, status="delete")
stop
10 close(99, status="delete")
call abort
program nutest
implicit none
+ logical l
integer id, ios
open(newunit=id, file="foo.txt", iostat=ios)
close(id, status="delete")
+ open(unit=10, file="foo.txt", status="old", iostat=ios)
+ if (ios /= 0) call abort
+
+ close(10, status="delete")
+
open(-10, file="foo.txt", iostat=ios)
if (ios == 0) call abort
+
+ inquire(file="foo.txt", exist=l)
+ if (l) call abort
end program nutest
open (UNIT=iunit,FORM='unformatted',ACCESS='direct',RECL=strlen)
write (iunit, rec=1) 'ABCD'
read (iunit, rec=1) string
- close (iunit)
+ close (iunit, status = 'delete')
if (string.ne.'ABCD') call abort
open (UNIT=iunit,FORM='unformatted',ACCESS='direct',STATUS='scratch',RECL=strlen)