2017-11-09 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / typebound_call_14.f03
blobe39b38d6ee6ae2421363410bb9a6bc6f4af6c6bf
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