Merged trunk at revision 161680 into branch.
[official-gcc.git] / gcc / testsuite / gfortran.dg / typebound_call_14.f03
blobe8cbf846e5d64a4f0c92dfc7c3310bd3f9c6b5e8
1 ! { dg-do compile }
3 ! PR 44211: [OOP] ICE with TBP of pointer component of derived type array
5 ! Original test case by Hans-Werner Boschmann <boschmann@tp1.physik.uni-siegen.de>
6 ! Modified by Janus Weil <janus@gcc.gnu.org>
8 module ice_module
9   type::ice_type
10      class(ice_type),pointer::next
11    contains
12      procedure::ice_sub
13      procedure::ice_fun
14   end type ice_type
15 contains
16   subroutine ice_sub(this)
17     class(ice_type)::this
18   end subroutine
19   integer function ice_fun(this)
20     class(ice_type)::this
21   end function
22   subroutine ice()
23     type(ice_type),dimension(2)::ice_array
24     call ice_array(1)%next%ice_sub()
25     print *,ice_array(2)%next%ice_fun()
26   end subroutine
27 end module ice_module
29 ! { dg-final { cleanup-modules "ice_module" } }