Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gfortran.dg/move_alloc_12.f90 @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 ! { dg-do compile } | |
2 ! | |
3 ! PR fortran/51948 | |
4 ! | |
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 | |
12 | |
13 select type (y) | |
14 type is(t) | |
15 call move_alloc (x, func) | |
16 end select | |
17 end function | |
18 | |
19 function func2(x, y) | |
20 class(t) :: y | |
21 class(t), allocatable :: func2 | |
22 class(t), allocatable :: x | |
23 | |
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 |