4 character(len
=5), pointer :: a(:), b(:)
5 character(len
=5), pointer :: c
, d
6 allocate (a(2), b(2), c
, d
)
7 a
= [ "abcde", "ABCDE" ]
8 call aloct_pointer_copy_4 (b
, a
)
11 if (any (a
/= b
)) stop 'WRONG'
13 call aloct_copy_4 (b
, a
)
16 if (any (a
/= b
)) stop 'WRONG'
22 if (d
/= '1cb15') stop 'WRONG'
26 if (d
/= '1cb15') stop 'WRONG'
29 subroutine aloct_pointer_copy_4(o
, i
)
30 character(len
=*), pointer :: o(:), i(:)
35 forall (i1
= nl1
:nu1
) o(i1
) = i(i1
)
36 end subroutine aloct_pointer_copy_4
37 subroutine aloct_copy_4(o
, i
)
38 character(len
=*), pointer :: o(:), i(:)
43 forall (i1
= nl1
:nu1
) o(i1
) = i(i1
)
44 end subroutine aloct_copy_4
45 subroutine test2(o
, i
)
46 character(len
=*) :: o
, i
51 forall (i1
= nl1
:nu1
) o(i1
:i1
) = i(i1
:i1
)
52 forall (i1
= nl1
:nu1
) o(i1
:i1
) = o(nu1
+1-i1
:nu1
+1-i1
)
54 subroutine test2p(o
, i
)
55 character(len
=*), pointer :: o
, i
60 forall (i1
= nl1
:nu1
) o(i1
:i1
) = i(i1
:i1
) ! <<<< ICE
61 forall (i1
= nl1
:nu1
) o(i1
:i1
) = o(nu1
+1-i1
:nu1
+1-i1
)