2 ! Test the fix for PR59198, where the field for the component 'term' in
3 ! the derived type 'decay_gen_t' was not being built.
5 ! Contributed by Paul Thomas and based on the original testcase by
6 ! Juergen Reuter <juergen.reuter@desy.de>
13 real elemental
function iface (arg
)
14 real, intent(in
) :: arg
19 type(decay_t
), pointer :: unstable_product
24 procedure(iface
), nopass
, pointer :: obs1_int
25 type(decay_term_t
), allocatable
:: term
32 type, extends (decay_gen_t
) :: decay_t
33 class(rng_t
), allocatable
:: rng
36 class(decay_t
), allocatable
:: object
41 type(decay_t
), pointer :: template
42 real, parameter :: arg
= 1.570796327
44 allocate (template
%rng
)
45 template
%obs1_int
=> cos
46 if (abs (template
%obs1_int (arg
) - cos (arg
)) .gt
. 1e-4) STOP 1
47 allocate (object
, source
= template
)
48 if (abs (object
%obs1_int (arg
) - cos (arg
)) .gt
. 1e-4) STOP 2