Debian Codegraph @

gcc/testsuite/gfortran.dg/class_45a.f03

raw
1 ! { dg-do compile }
2 !
3 ! PR 50227: [4.7 Regression] [OOP] ICE-on-valid with allocatable class variable
4 !
5 ! Contributed by Andrew Benson <[email protected]>
6
7 module G_Nodes
8 private
9
10 type, public :: t0
11 end type
12
13 type, public, extends(t0) :: t1
14 end type
15
16 contains
17
18 function basicGet(self)
19 implicit none
20 class(t0), pointer :: basicGet
21 class(t0), target, intent(in) :: self
22 select type (self)
23 type is (t1)
24 basicGet => self
25 end select
26 end function basicGet
27
28 end module G_Nodes