2 ! { dg-options "-ftest-forall-temp" }
5 character(len
=5), pointer :: a(:), b(:)
6 character(len
=5), pointer :: c
, d
7 allocate (a(2), b(2), c
, d
)
8 a
= [ "abcde", "ABCDE" ]
9 call aloct_pointer_copy_4 (b
, a
)
12 if (any (a
/= b
)) stop 'WRONG'
14 call aloct_copy_4 (b
, a
)
17 if (any (a
/= b
)) stop 'WRONG'
23 if (d
/= '1cb15') stop 'WRONG'
27 if (d
/= '1cb15') stop 'WRONG'
30 subroutine aloct_pointer_copy_4(o
, i
)
31 character(len
=*), pointer :: o(:), i(:)
36 forall (i1
= nl1
:nu1
) o(i1
) = i(i1
)
37 end subroutine aloct_pointer_copy_4
38 subroutine aloct_copy_4(o
, i
)
39 character(len
=*), pointer :: o(:), i(:)
44 forall (i1
= nl1
:nu1
) o(i1
) = i(i1
)
45 end subroutine aloct_copy_4
46 subroutine test2(o
, i
)
47 character(len
=*) :: o
, i
52 forall (i1
= nl1
:nu1
) o(i1
:i1
) = i(i1
:i1
)
53 forall (i1
= nl1
:nu1
) o(i1
:i1
) = o(nu1
+1-i1
:nu1
+1-i1
)
55 subroutine test2p(o
, i
)
56 character(len
=*), pointer :: o
, i
61 forall (i1
= nl1
:nu1
) o(i1
:i1
) = i(i1
:i1
) ! <<<< ICE
62 forall (i1
= nl1
:nu1
) o(i1
:i1
) = o(nu1
+1-i1
:nu1
+1-i1
)