[FORTRAN PATCH]: more cleanups of testsuite temp files
Kaveh R. Ghazi
ghazi@caipclassic.rutgers.edu
Tue Mar 21 13:07:00 GMT 2006
This patch cleans up a few more fortran testcases that leave behind
temporary files. Tested via fortran-only mainline "make check" on
sparc-sun-solaris2.10.
Note one testcase (unf_io_convert_1.f90) had the necessary machinery
to delete the file, but it was placed in an error path that was never
reached. So I simply moved the code to the path always taken.
Okay for mainline/4.1?
Thanks,
--Kaveh
2006-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gfortran.dg/advance.f90, gfortran.dg/backspace_2.f,
gfortran.dg/comma.f, gfortran.dg/direct_io_2.f90,
gfortran.dg/tl_editing.f90, gfortran.dg/unf_io_convert_1.f90,
gfortran.dg/write_back.f,
gfortran.fortran-torture/execute/inquire_1.f90,
gfortran.fortran-torture/execute/inquire_3.f90: Delete temp file.
diff -rup orig/egcc-SVN20060319/gcc/testsuite/gfortran.dg/advance.f90 egcc-SVN20060319/gcc/testsuite/gfortran.dg/advance.f90
--- orig/egcc-SVN20060319/gcc/testsuite/gfortran.dg/advance.f90 2006-01-23 00:14:55.000000000 -0500
+++ egcc-SVN20060319/gcc/testsuite/gfortran.dg/advance.f90 2006-03-21 00:03:15.643479000 -0500
@@ -9,4 +9,5 @@ program pr25463
rewind (10)
read (10, '(a)') str
if (str.ne.'abc') call abort()
+ close (10, status='delete')
end
diff -rup orig/egcc-SVN20060319/gcc/testsuite/gfortran.dg/backspace_2.f egcc-SVN20060319/gcc/testsuite/gfortran.dg/backspace_2.f
--- orig/egcc-SVN20060319/gcc/testsuite/gfortran.dg/backspace_2.f 2006-01-23 00:14:55.000000000 -0500
+++ egcc-SVN20060319/gcc/testsuite/gfortran.dg/backspace_2.f 2006-03-20 09:34:05.595617000 -0500
@@ -17,5 +17,6 @@
1011 continue
backspace 11
backspace 11
+ close(11, status='delete')
end
diff -rup orig/egcc-SVN20060319/gcc/testsuite/gfortran.dg/comma.f egcc-SVN20060319/gcc/testsuite/gfortran.dg/comma.f
--- orig/egcc-SVN20060319/gcc/testsuite/gfortran.dg/comma.f 2006-01-23 00:15:15.000000000 -0500
+++ egcc-SVN20060319/gcc/testsuite/gfortran.dg/comma.f 2006-03-20 09:35:36.478085000 -0500
@@ -14,5 +14,6 @@
rewind(11)
read(11,*)stuff
if (stuff.ne.1.0) call abort()
+ close(11, status='delete')
end
diff -rup orig/egcc-SVN20060319/gcc/testsuite/gfortran.dg/direct_io_2.f90 egcc-SVN20060319/gcc/testsuite/gfortran.dg/direct_io_2.f90
--- orig/egcc-SVN20060319/gcc/testsuite/gfortran.dg/direct_io_2.f90 2006-01-23 00:15:11.000000000 -0500
+++ egcc-SVN20060319/gcc/testsuite/gfortran.dg/direct_io_2.f90 2006-03-20 09:10:35.850340000 -0500
@@ -40,5 +40,6 @@
READ(7, REC = IREC) IPROG, IFILE, ITOTR, IRLGN, IRECN, IEOF,IVON21, IVON22, IVON31, IVON32, IVON33, IVON34, IVON55, IVON56
IF (IRECN .NE. IRECCK) CALL ABORT
4135 CONTINUE
+ CLOSE(7, STATUS='DELETE')
STOP
END
diff -rup orig/egcc-SVN20060319/gcc/testsuite/gfortran.dg/tl_editing.f90 egcc-SVN20060319/gcc/testsuite/gfortran.dg/tl_editing.f90
--- orig/egcc-SVN20060319/gcc/testsuite/gfortran.dg/tl_editing.f90 2006-01-23 00:14:47.000000000 -0500
+++ egcc-SVN20060319/gcc/testsuite/gfortran.dg/tl_editing.f90 2006-03-20 23:56:04.118783000 -0500
@@ -27,6 +27,7 @@ program tl_editting
rewind(10)
read(10, '(a)') s
if (s.ne.cline) call abort
+ close(10, status='delete')
end program tl_editting
diff -rup orig/egcc-SVN20060319/gcc/testsuite/gfortran.dg/unf_io_convert_1.f90 egcc-SVN20060319/gcc/testsuite/gfortran.dg/unf_io_convert_1.f90
--- orig/egcc-SVN20060319/gcc/testsuite/gfortran.dg/unf_io_convert_1.f90 2006-01-23 00:15:01.000000000 -0500
+++ egcc-SVN20060319/gcc/testsuite/gfortran.dg/unf_io_convert_1.f90 2006-03-20 09:15:24.255192000 -0500
@@ -85,11 +85,11 @@ program main
else
call abort
endif
- ! use hexdump to look at the file "fort.9"
- if (debug) then
- close(9)
- else
- close(9,status='DELETE')
- endif
end if
+ ! use hexdump to look at the file "fort.9"
+ if (debug) then
+ close(9)
+ else
+ close(9,status='DELETE')
+ endif
end program main
diff -rup orig/egcc-SVN20060319/gcc/testsuite/gfortran.dg/write_back.f egcc-SVN20060319/gcc/testsuite/gfortran.dg/write_back.f
--- orig/egcc-SVN20060319/gcc/testsuite/gfortran.dg/write_back.f 2006-03-10 20:01:34.000000000 -0500
+++ egcc-SVN20060319/gcc/testsuite/gfortran.dg/write_back.f 2006-03-20 09:24:23.444577000 -0500
@@ -20,5 +20,6 @@
read(11, end=250)idata
call abort()
250 continue
+ close(11, status="delete")
end
diff -rup orig/egcc-SVN20060319/gcc/testsuite/gfortran.fortran-torture/execute/inquire_1.f90 egcc-SVN20060319/gcc/testsuite/gfortran.fortran-torture/execute/inquire_1.f90
--- orig/egcc-SVN20060319/gcc/testsuite/gfortran.fortran-torture/execute/inquire_1.f90 2006-01-23 00:07:58.000000000 -0500
+++ egcc-SVN20060319/gcc/testsuite/gfortran.fortran-torture/execute/inquire_1.f90 2006-03-20 09:19:57.028206000 -0500
@@ -5,4 +5,5 @@
INQUIRE(UNIT=9,ACCESS=ACCESS,BLANK=BLANK)
IF(BLANK.NE.'NULL') CALL ABORT
IF(ACCESS.NE.'SEQUENTIAL') CALL ABORT
+ CLOSE(UNIT=9,STATUS='DELETE')
END
diff -rup orig/egcc-SVN20060319/gcc/testsuite/gfortran.fortran-torture/execute/inquire_3.f90 egcc-SVN20060319/gcc/testsuite/gfortran.fortran-torture/execute/inquire_3.f90
--- orig/egcc-SVN20060319/gcc/testsuite/gfortran.fortran-torture/execute/inquire_3.f90 2006-01-23 00:07:59.000000000 -0500
+++ egcc-SVN20060319/gcc/testsuite/gfortran.fortran-torture/execute/inquire_3.f90 2006-03-20 09:21:24.945869000 -0500
@@ -9,5 +9,6 @@
INQUIRE(UNIT=9,NEXTREC=NREC)
IF (NREC.NE.2) CALL ABORT
! PRINT*,NREC
+ CLOSE(UNIT=9,STATUS='DELETE')
END
More information about the Fortran
mailing list