OSDN Git Service

PR target/51393
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / typebound_generic_8.f03
1 ! { dg-do compile }
2 !
3 ! PR 44565: [4.6 Regression] [OOP] ICE in gimplify_expr with array-valued generic TBP
4 !
5 ! Contributed by Hans-Werner Boschmann <boschmann@tp1.physik.uni-siegen.de>
6
7 module ice6
8
9   type :: t
10    contains
11      procedure :: get_array
12      generic :: get_something => get_array
13   end type
14
15 contains
16
17   function get_array(this)
18     class(t) :: this
19     real,dimension(2) :: get_array
20   end function get_array
21
22   subroutine do_something(this)
23     class(t) :: this
24     print *,this%get_something()
25   end subroutine do_something
26
27 end module ice6 
28
29 ! { dg-final { cleanup-modules "ice6" } }