summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pointer_1.f90
blob: 01ad8b951ca4778578ea5bfbe6bec81a6c0bf441 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
! Testcase for PR34770
! { dg-do run }
  implicit none
  integer, target :: x(0:12)
  integer, pointer :: z(:)
  integer i
  do i = 0,12
    x(i) = i
  enddo
  z => x
  do i = 0,12
    if (x(i) /= i .or. z(i) /= i) call abort
  enddo
end