Debian Codegraph @

gcc/testsuite/gfortran.dg/class_28.f03

raw
1 ! { dg-do compile }
2 !
3 ! PR 46344: [4.6 Regression] [OOP] ICE with allocatable CLASS components
4 !
5 ! Contributed by Salvatore Filippone <[email protected]>
6
7 module m
8
9 type t1
10 end type
11
12 type t2
13 class(t1), allocatable :: cc
14 end type
15
16 class(t2), allocatable :: sm
17
18 end module m
19
20
21 module m2
22
23 type t1
24 end type
25
26 type t2
27 class(t1), allocatable :: c
28 end type
29
30 type(t1) :: w
31
32 end module m2
33
34
35 program p
36 use m
37 implicit none
38
39 type(t2), allocatable :: x(:)
40
41 allocate(x(1))
42
43 end program p