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