| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! Check that move alloc handles different, type compatible |
| 4 |
! declared types |
| 5 |
! |
| 6 |
type t |
| 7 |
end type t |
| 8 |
type, extends(t) :: t2 |
| 9 |
end type t2 |
| 10 |
|
| 11 |
class(t), allocatable :: x |
| 12 |
class(t2), allocatable :: y |
| 13 |
allocate(y) |
| 14 |
call move_alloc (y, x) |
| 15 |
end |