summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr49103.f90
blob: e744c9bbe7f178c35e1d558a50a86be4108b8ef9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! PR fortran/49103
! { dg-do run }
  integer :: a(2), b(2), i, j
  open (10, status='scratch')
  do j = 1, 2
    a = (/ 0, 0 /)
    b = (/ 1, 1 /)
    do i = 1, 2
      write (10, *) a
      write (10, *) b
    end do
  end do
  rewind (10)
  do i = 0, 7
    read (10, *) a
    if (any (a .ne. mod (i, 2))) call abort
  end do
  close (10)
end