aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/open_access_append_1.f90
blob: cc8f57610612f3ff4f4309e01cf99f1f012f4cd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
! { dg-do run }
! Testcase for the GNU extension OPEN(...,ACCESS="APPEND")
  open (10,file="foo")
  close (10,status="delete")

  open (10,file="foo",access="append") ! { dg-warning "Extension: ACCESS specifier in OPEN statement" }
  write (10,*) 42
  close (10,status="keep")
  open (10,file="foo",access="append") ! { dg-warning "Extension: ACCESS specifier in OPEN statement" }
  write (10,*) -42
  close (10,status="keep")

  open (10,file="foo")
  read (10,*) i
  if (i /= 42) STOP 1
  read (10,*) i
  if (i /= -42) STOP 2
  close (10,status="delete")

  end
! { dg-output ".*Extension.*Extension" }