1! { dg-do compile }
2!
3! PR 48699: [OOP] MOVE_ALLOC inside SELECT TYPE
4!
5! Contributed by Salvatore Filippone <sfilippone@uniroma2.it>
6!
7! Updated for PR fortran/48887
8
9program testmv2
10
11  type bar
12    integer, allocatable  :: ia(:), ja(:)
13  end type bar
14
15  class(bar), allocatable :: sm,sm2
16
17  allocate(sm2)
18
19  select type(sm2) 
20  type is (bar)
21    call move_alloc(sm2,sm) ! { dg-error "must be ALLOCATABLE" }
22  end select
23
24end program testmv2
25