RISC-V: Regenerate opt urls.
[official-gcc.git] / gcc / testsuite / gfortran.dg / move_alloc_2.f90
blob2c95d1c44f80c4a997f8b1091e567e745b01917c
1 ! { dg-do run }
3 ! PR 45004: [OOP] Segfault with allocatable scalars and move_alloc
5 ! Contributed by Salvatore Filippone <sfilippone@uniroma2.it>
7 program bug18
9 type foo
10 integer :: i
11 end type foo
13 type bar
14 class(foo), allocatable :: bf
15 end type bar
17 class(foo), allocatable :: afab
18 type(bar) :: bb
20 allocate(foo :: afab)
21 afab%i = 8
22 call move_alloc(afab, bb%bf)
23 if (.not. allocated(bb%bf)) STOP 1
24 if (allocated(afab)) STOP 2
25 if (bb%bf%i/=8) STOP 3
27 end program bug18