2 ! PR51870 - ALLOCATE with class function expression for SOURCE failed.
3 ! This is the original test in the PR.
5 ! Reported by Tobias Burnus <burnus@gcc.gnu.org>
7 module show_producer_class
10 integer :: variable = -1
15 procedure ,nopass :: create_show
18 function create_show () result(new_integrand)
19 class(integrand) ,allocatable :: new_integrand
20 allocate(new_integrand)
21 new_integrand%variable = 99
26 use show_producer_class
28 class(integrand) ,allocatable :: kernel1, kernel2
29 type(show_producer) :: executive_producer
31 allocate(kernel1, kernel2,mold=executive_producer%create_show ())
32 if (kernel1%variable .ne. -1) STOP 1
33 if (kernel2%variable .ne. -1) STOP 2