aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/pr49698.f90
blob: 638cbb0b78525f35390113551b21dd5ba682fa56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! PR fortran/49698
! { dg-do compile }
subroutine foo (x, y, z)
  type S
    integer, pointer :: e => null()
  end type S
  type T
    type(S), dimension(:), allocatable :: a
  end type T
  type(T) :: x, y
  integer :: z, i
  forall (i = 1 : z)
    y%a(i)%e => x%a(i)%e
  end forall
end subroutine foo