fix pr/45972
[official-gcc.git] / gcc / testsuite / gfortran.dg / open_access_append_1.f90
blob8dae327968df72509d287db733d1bf45d2b38763
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-warning "Extension: ACCESS specifier in OPEN statement" }
7 write (10,*) 42
8 close (10,status="keep")
9 open (10,file="foo",access="append") ! { dg-warning "Extension: ACCESS specifier in OPEN statement" }
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
21 ! { dg-output ".*Extension.*Extension" }