mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-21 08:30:35 +08:00
open_errors.f90: Added if statements checking the value of iostat.
2007-04-26 Wolfgang Gellerich <gellerich@de.ibm.com> * gfortran.dg/open_errors.f90: Added if statements checking the value of iostat. From-SVN: r124182
This commit is contained in:
parent
6f7195603e
commit
007bddf4a8
@ -1,3 +1,8 @@
|
||||
2007-04-26 Wolfgang Gellerich <gellerich@de.ibm.com>
|
||||
|
||||
* gfortran.dg/open_errors.f90: Added if statements checking
|
||||
the value of iostat.
|
||||
|
||||
2007-04-26 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/31598
|
||||
|
@ -7,11 +7,13 @@ open(77,file=n,status="new")
|
||||
close(77, status="keep")
|
||||
msg=""
|
||||
open(77,file=n,status="new", iomsg=msg, iostat=i)
|
||||
if (i == 0) call abort()
|
||||
if (msg /= "File 'temptestfile' already exists") call abort()
|
||||
|
||||
open(77,file=n,status="old")
|
||||
close(77, status="delete")
|
||||
open(77,file=n,status="old", iomsg=msg, iostat=i)
|
||||
if (i == 0) call abort()
|
||||
if (msg /= "File 'temptestfile' does not exist") call abort()
|
||||
|
||||
open(77,file="./", iomsg=msg, iostat=i)
|
||||
@ -22,6 +24,7 @@ i = chmod(n, "-w")
|
||||
if (i == 0) then
|
||||
close(77, status="keep")
|
||||
open(77,file=n, iomsg=msg, iostat=i, action="write")
|
||||
if (i == 0) call abort()
|
||||
if (msg /= "Permission denied trying to open file 'temptestfile'") call abort()
|
||||
endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user