Debian Codegraph @

gcc/testsuite/gfortran.dg/alloc_comp_class_2.f90

raw
1 ! { dg-do run }
2 !
3 ! PR 46838: [OOP] Initialization of polymorphic allocatable components
4 !
5 ! Contributed by Salvatore Filippone <[email protected]>
6
7 program 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
22 contains
23
24 subroutine cdall(desc)
25 type(desc_type), intent(out) :: desc
26 if (allocated(desc%indxmap)) STOP 1
27 end subroutine cdall
28
29 end program