* config/sparc/driver-sparc.c (cpu_names): Add SPARC-T5 entry.
[official-gcc.git] / gcc / testsuite / gfortran.dg / dec_io_6.f90
blob2dfaf9d890161a56090216106454c57b56c5ad29
1 ! { dg-do run }
2 ! { dg-options "-fdec" }
4 ! Test that we get a run-time warning for close-on-delete with READONLY,
5 ! and that the file is protected from deletion.
8 implicit none
10 integer :: fd = 8
11 character(*), parameter :: f = "dec_io_6.txt"
12 logical :: exists
14 open(unit=fd,file=f,action='write')
15 close(unit=fd)
17 open(unit=fd,file=f,action='read',readonly)
18 close(unit=fd,status='delete') ! { dg-output "file protected by READONLY" }
20 inquire(file=f, EXIST=exists)
21 if (.not. exists) then
22 print *, 'file was not protected by READONLY!'
23 call abort()
24 endif
26 open(unit=fd,file=f,action='write')
27 close(unit=fd,status='delete') ! cleanup
29 end