2017-12-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / move_alloc_12.f90
blob880b302d5c03ffbbb3746513058a307d0c440032
1 ! { dg-do compile }
3 ! PR fortran/51948
5 type :: t
6 end type t
7 contains
8 function func(x, y)
9 class(t) :: y
10 type(t), allocatable :: func
11 type(t), allocatable :: x
13 select type (y)
14 type is(t)
15 call move_alloc (x, func)
16 end select
17 end function
19 function func2(x, y)
20 class(t) :: y
21 class(t), allocatable :: func2
22 class(t), allocatable :: x
24 block
25 block
26 select type (y)
27 type is(t)
28 call move_alloc (x, func2)
29 end select
30 end block
31 end block
32 end function
33 end