2011-05-23 Tom de Vries <tom@codesourcery.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_25.f03
blob3588b7759e57edbd73c1830b1e16c5cbfe3c547e
1 ! { dg-do run }
3 ! PR [OOP] Compile-time errors on typed allocation and pointer function result assignment
5 ! Contributed by Damian Rouson <damian@rouson.net>
7 module m
9   implicit none
11   type foo 
12   end type
14   type ,extends(foo) :: bar
15   end type
17 contains
19   function new_bar()
20     class(foo) ,pointer :: new_bar
21     allocate(bar :: new_bar) 
22   end function
24 end module
26 end 
28 ! { dg-final { cleanup-modules "m" } }