]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/gfortran.dg/auto_dealloc_2.f90
gcc: Make exec-tool.in handle missing Binutils more gracefully
[gcc.git] / gcc / testsuite / gfortran.dg / auto_dealloc_2.f90
CommitLineData
c7f17815
JW
1! { dg-do compile }
2! { dg-options "-fdump-tree-original" }
3!
4! PR 47637: [OOP] Memory leak involving INTENT(OUT) CLASS argument w/ allocatable components
5!
6! Contributed by Rich Townsend <townsend@astro.wisc.edu>
7
8program test
9
10type :: t
11 integer, allocatable :: i(:)
12end type
13
ef292537 14block ! New block as the main program implies SAVE
c7f17815
JW
15type(t) :: a
16
17call init(a)
18call init(a)
ef292537 19end block
c7f17815
JW
20contains
21
22 subroutine init(x)
23 class(t), intent(out) :: x
24 allocate(x%i(1000))
25 end subroutine
26
d7caf313 27end program
c7f17815 28
ed3f1ef2 29! { dg-final { scan-tree-dump-times "__builtin_free" 4 "original" } }
d7caf313 30! { dg-final { scan-tree-dump-times "_vptr->_final \\(&desc" 1 "original" } }
This page took 9.253088 seconds and 5 git commands to generate.