1! { dg-do run } 2! 3! PR 46838: [OOP] Initialization of polymorphic allocatable components 4! 5! Contributed by Salvatore Filippone <sfilippone@uniroma2.it> 6 7program bug28 8 9 implicit none 10 11 type indx_map 12 end type 13 14 type desc_type 15 integer, allocatable :: matrix_data 16 class(indx_map), allocatable :: indxmap 17 end type 18 19 type(desc_type) :: desc_a 20 call cdall(desc_a) 21 22contains 23 24 subroutine cdall(desc) 25 type(desc_type), intent(out) :: desc 26 if (allocated(desc%indxmap)) call abort() 27 end subroutine cdall 28 29end program 30