3 ! PR 54784: [4.7/4.8 Regression] [OOP] wrong code in polymorphic allocation with SOURCE
5 ! Contributed by Jeremy Kozdon <jkozdon@gmail.com>
11 real, allocatable
:: fields
15 class(block
),allocatable
:: B
19 type(list
),dimension(2) :: L
25 allocate(b1
%fields
,source
=5.)
27 allocate(d
%L(2)%B
,source
=b1
) ! wrong code
29 if (d
%L(2)%B
%fields
/=5.) STOP 1