3 ! Test the fix for PR81903
5 ! Contributed by Karl May <karl.may0@freenet.de>
9 Real, Allocatable
:: a(:,:)
14 Real, Pointer, contiguous
:: a(:,:)
22 Class(TestType_A
), Pointer :: TT_A(:)
23 Type(TestType_B
), Allocatable
:: TT_B(:)
25 Procedure
, Pass
:: SetPt
=> SubSetPt
28 Module Subroutine SubSetPt(this
)
29 class(TestType_C
), Intent(InOut
), Target
:: this
33 Submodule(TestMod_C
) SetPt
35 Module Procedure SubSetPt
40 associate(x
=>this
%TT_B
,y
=>this
%TT_A
)
43 sum_a
= sum_a
+ sum (int (x(i
)%a
))
47 if (sum_a
.ne
. 30) STOP 1
54 Type(TestType_C
) :: tb
55 Type(TestType_A
), allocatable
, Target
:: ta(:)
57 real :: src(2,2) = reshape ([(real(i
), i
= 1,4)],[2,2])
58 allocate(ta(2),tb
%tt_b(2))
60 allocate(ta(i
)%a(2,2), source
= src
*real(i
))