Commit 14817beb by Dominique d'Humieres Committed by Jerry DeLisle

re PR libfortran/59419 (Failing OPEN with FILE='xxx' and IOSTAT creates the file…

re PR libfortran/59419 (Failing OPEN with FILE='xxx' and IOSTAT creates the file 'xxx' after revision 196783)

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.

From-SVN: r206557
parent 9c111368
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
......
......@@ -11,3 +11,4 @@ program main
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" } }
......@@ -10,6 +10,8 @@
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)
......
......@@ -22,6 +22,7 @@ open(99,access="sequential")
inquire(99, stream=str)
!print *, "str=",str
if (str /= "NO") goto 10
close(99, status="delete")
stop
10 close(99, status="delete")
call abort
......
......@@ -6,6 +6,7 @@
program nutest
implicit none
logical l
integer id, ios
open(newunit=id, file="foo.txt", iostat=ios)
......@@ -16,6 +17,14 @@ program nutest
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
......@@ -19,7 +19,7 @@
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment