modula2: Simplify REAL/LONGREAL/SHORTREAL node creation.
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_45a.f03
blob91f11c4ecce9d5945247dc18133359246e393db4
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