6 ! CLASS => CLASS pointer assignment for function results
13 type, extends(t
) :: t2
17 class(t
), pointer :: f1
22 class(t
), pointer :: f2(:)
24 f2(:)%ii
= [-11,-22,-33]
31 class(t
), pointer :: p1
, p2(:), p3(:,:)
35 allocate (t2
:: p1
, p2(1), p3(1,1))
36 if (.not
. same_type_as (p1
, my_t2
)) call abort()
37 if (.not
. same_type_as (p2
, my_t2
)) call abort()
38 if (.not
. same_type_as (p3
, my_t2
)) call abort()
41 if (p1
%ii
/= 123) call abort ()
42 if (.not
. same_type_as (p1
, my_t
)) call abort()
45 if (any (p2
%ii
/= [-11,-22,-33])) call abort ()
46 if (.not
. same_type_as (p2
, my_t
)) call abort()
49 if (any (p3(2,:)%ii
/= [-11,-22,-33])) call abort ()
50 if (.not
. same_type_as (p3
, my_t
)) call abort()