RISC-V: Regenerate opt urls.
[official-gcc.git] / gcc / testsuite / gfortran.dg / finalize_36.f90
blob432f5472aebc2256323b1010832c290de71795d3
1 ! { dg-do run }
2 ! { dg-additional-options "-fdump-tree-original" }
3 ! PR 94109
4 ! This used to leak memory. Test case by Antony Lewis.
5 module debug
6 implicit none
8 Type Tester
9 real, dimension(:), allocatable :: Dat, Dat2
10 end Type
12 Type TestType2
13 Type(Tester) :: T
14 end type TestType2
16 contains
18 subroutine Leaker
19 class(TestType2), pointer :: ActiveState
20 Type(Tester) :: Temp
22 allocate(Temp%Dat2(10000))
24 allocate(TestType2::ActiveState)
25 ActiveState%T = Temp
26 deallocate(ActiveState)
28 end subroutine
30 end module
33 program run
34 use debug
36 call Leaker()
38 end program
39 ! { dg-final { scan-tree-dump-times "__builtin_free\\ \\(ptr2" 4 "original" } }