Debian Codegraph @

gcc/testsuite/gfortran.dg/structure_constructor_13.f03

raw
1 ! { dg-do run }
2 !
3 ! Contributed by Melven Roehrig-Zoellner <[email protected]>
4 ! PR fortran/66035
5
6 program test_pr66035
7 type t
8 end type t
9 type w
10 class(t), allocatable :: c
11 end type w
12
13 type(t) :: o
14
15 call test(o)
16 contains
17 subroutine test(o)
18 class(t), intent(inout) :: o
19 type(w), dimension(:), allocatable :: list
20
21 select type (o)
22 class is (t)
23 list = [w(o)] ! This caused an ICE
24 class default
25 STOP 1
26 end select
27 end subroutine
28 end program