Derived type from the MOLD was not carried over
to the newly allocated pointer or allocatable.
This may lead to wrong dynamic type when the pointer or allocatable
is polymorphic as shown in the example below:
type :: p1 integer :: a end type type, extends(p1) :: p2 integer :: b end type class(p1), pointer :: p(:) allocate(p(5), MOLD=p2(1,2))