./:
[official-gcc.git] / gcc / testsuite / gfortran.dg / open_access_append_1.f90
blob7aa7991a75ac05636a9a57c5a9fe7a95efe4d03b
1 ! { dg-do run }
2 ! Testcase for the GNU extension OPEN(...,ACCESS="APPEND")
3 open (10,file="foo")
4 close (10,status="delete")
6 open (10,file="foo",access="append") ! { dg-output ".*Extension.*" }
7 write (10,*) 42
8 close (10,status="keep")
9 open (10,file="foo",access="append") ! { dg-output ".*Extension.*" }
10 write (10,*) -42
11 close (10,status="keep")
13 open (10,file="foo")
14 read (10,*) i
15 if (i /= 42) call abort
16 read (10,*) i
17 if (i /= -42) call abort
18 close (10,status="delete")
20 end