PR target/83368
[official-gcc.git] / gcc / testsuite / gfortran.dg / dec_io_5.f90
blobc6633a508bf1c49c4ab5e03a31ee67c82d43bbf7
1 ! { dg-do run }
2 ! { dg-options "-fdec" }
3 ! { dg-shouldfail "ACTION conflicts with READONLY" }
5 ! Test that we get a run-time error for opening a READONLY file with
6 ! ACTION='WRITE'.
9 implicit none
11 integer :: fd = 8
12 character(*), parameter :: f = "dec_io_5.txt"
13 character(10), volatile :: c
14 c = 'write'
16 open(unit=fd,file=f,action=c,readonly)
18 end
19 ! { dg-output "ACTION conflicts with READONLY" }