Debian Codegraph @

gcc/testsuite/gfortran.dg/move_alloc_4.f90

raw
1 ! { dg-do run }
2 ! { dg-options "-fdump-tree-original" }
3 !
4 ! PR 48700: memory leak with MOVE_ALLOC
5 !
6 ! Contributed by Salvatore Filippone <[email protected]>
7
8 program testmv3
9 type bar
10 integer, allocatable :: ia(:), ja(:)
11 end type
12
13 block ! For auto-dealloc, as PROGRAM implies SAVE
14 type(bar), allocatable :: sm,sm2
15
16 allocate(sm)
17 allocate(sm%ia(10),sm%ja(10))
18
19 call move_alloc(sm2,sm)
20 end block
21 end program testmv3
22
23 ! { dg-final { scan-tree-dump-times "__builtin_free" 9 "original" } }