Rebase.
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_45a.f03
blobc3c9ac20e803ff0422f882a24ca4dab78eb8ca4d
1 ! { dg-do compile }
3 ! PR 50227: [4.7 Regression] [OOP] ICE-on-valid with allocatable class variable
5 ! Contributed by Andrew Benson <abenson@caltech.edu>
7 module G_Nodes
8   private
10   type, public :: t0
11   end type
12   
13   type, public, extends(t0) :: t1
14   end type
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
28 end module G_Nodes
29 ! { dg-final { keep-modules "" } }