* cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
[official-gcc.git] / gcc / testsuite / gfortran.dg / typebound_proc_23.f90
blob0109c7478de44e8c340b0287fbd5438460a7153a
1 ! { dg-do run }
3 ! PR 49562: [4.6/4.7 Regression] [OOP] assigning value to type-bound function
5 ! Contributed by Hans-Werner Boschmann <boschmann@tp1.physik.uni-siegen.de>
7 module ice
8 type::ice_type
9 contains
10 procedure::ice_func
11 end type
12 integer, target :: it = 0
13 contains
14 function ice_func(this)
15 integer, pointer :: ice_func
16 class(ice_type)::this
17 ice_func => it
18 end function ice_func
19 subroutine ice_sub(a)
20 class(ice_type)::a
21 a%ice_func() = 1
22 end subroutine ice_sub
23 end module
25 use ice
26 type(ice_type) :: t
27 if (it/=0) call abort()
28 call ice_sub(t)
29 if (it/=1) call abort()
30 end