open_errors.f90: Check for existance of temptestfile.
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Fri, 29 Jun 2007 05:38:45 +0000 (05:38 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Fri, 29 Jun 2007 05:38:45 +0000 (05:38 +0000)
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.

From-SVN: r126105

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

index 93bc11006a669b068881f5bacfb3cbc6f18742e5..00e2dc8285e37e7d935ff386077d265811e8342b 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 ff55d3a59daf7d7a923878e4d53f6f6ad3f01226..1f5c1c08d5bcb092989cb70dc88156493a6342e0 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()