OSDN Git Service

2007-06-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 29 Jun 2007 05:38:45 +0000 (05:38 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 29 Jun 2007 05:38:45 +0000 (05:38 +0000)
* gfortran.dg/open_errors.f90: Check for existance of temptestfile.
If it exists, don't try to create it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126105 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/open_errors.f90

index 93bc110..00e2dc8 100644 (file)
@@ -1,3 +1,8 @@
+2007-06-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       * gfortran.dg/open_errors.f90: Check for existance of temptestfile.
+       If it exists, don't try to create it.
+
 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
 
        * g++.dg/ext/visibility/ms-compat-1.C: New.
index ff55d3a..1f5c1c0 100644 (file)
@@ -3,8 +3,12 @@
 ! Submitted by Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 character(60) :: msg
 character(25) :: n = "temptestfile"
-open(77,file=n,status="new")
-close(77, status="keep")
+logical :: there
+inquire(file=n, exist=there)
+if (.not.there) then
+  open(77,file=n,status="new")
+  close(77, status="keep")
+endif
 msg=""
 open(77,file=n,status="new", iomsg=msg, iostat=i)
 if (i == 0) call abort()