PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / select_type_23.f03
blobced853745f4ffac042da40059c1eba7ddaf7f968
1 ! { dg-do compile }
3 ! PR 48699: [OOP] MOVE_ALLOC inside SELECT TYPE
5 ! Contributed by Salvatore Filippone <sfilippone@uniroma2.it>
7 ! Updated for PR fortran/48887
9 program testmv2
11   type bar
12     integer, allocatable  :: ia(:), ja(:)
13   end type bar
15   class(bar), allocatable :: sm,sm2
17   allocate(sm2)
19   select type(sm2) 
20   type is (bar)
21     call move_alloc(sm2,sm) ! { dg-error "must be ALLOCATABLE" }
22   end select
24 end program testmv2