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
)) STOP 1
37 if (.not
. same_type_as (p2
, my_t2
)) STOP 2
38 if (.not
. same_type_as (p3
, my_t2
)) STOP 3
41 if (p1
%ii
/= 123) STOP 4
42 if (.not
. same_type_as (p1
, my_t
)) STOP 5
45 if (any (p2
%ii
/= [-11,-22,-33])) STOP 6
46 if (.not
. same_type_as (p2
, my_t
)) STOP 7
49 if (any (p3(2,:)%ii
/= [-11,-22,-33])) STOP 8
50 if (.not
. same_type_as (p3
, my_t
)) STOP 9