3 ! Test the fix for PR40737 comment 17 as part of the overall fix for PR34640.
5 ! Contributed by Josh Hykes <joshuahykes@yahoo.com>
10 character(8) :: string
15 type(t1
), pointer :: fp(:)
20 type(t2
), pointer :: as
23 type(t3
), pointer :: as_typ(:) => null()
25 character(8), pointer, public
:: p(:)
29 subroutine as_set_alias (i
)
33 integer, intent(in
) :: i
36 allocate (as_typ(1)%as
)
37 allocate (as_typ(1)%as
%fp(2), source
= [t1("abcdefgh"),t1("ijklmnop")])
38 p
=> as_typ(i
)%as
%fp(:)%string
40 end subroutine as_set_alias
47 if (any (p
.ne
. ["abcdefgh","ijklmnop"])) call abort
48 deallocate (as_typ(1)%as
%fp
)
49 deallocate (as_typ(1)%as
)