1118611Snjl! PR fortran/49698 2118611Snjl! { dg-do compile } 3118611Snjlsubroutine foo (x, y, z) 4118611Snjl type S 5118611Snjl integer, pointer :: e => null() 6118611Snjl end type S 7118611Snjl type T 8118611Snjl type(S), dimension(:), allocatable :: a 9118611Snjl end type T 10118611Snjl type(T) :: x, y 11118611Snjl integer :: z, i 12118611Snjl forall (i = 1 : z) 13118611Snjl y%a(i)%e => x%a(i)%e 14118611Snjl end forall 15118611Snjlend subroutine foo 16118611Snjl