aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/transfer_intrinsic_6.f90
blob: e76bc49aeda70c9ba9db3dbc2c37414f4a022d60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! { dg-do compile }
! { dg-options "-fdump-tree-original" }
!
! PR 58058: [4.7/4.8/4.9 Regression] Memory leak with transfer function
!
! Contributed by Thomas Jourdan <thomas.jourdan@orange.fr>

  implicit none

  integer, dimension(3) :: t1
  character(len=64) :: str
  
  t1 = (/1,2,3/)

  str = transfer(t1,str)

end

! { dg-final { scan-tree-dump-times "__builtin_free" 1 "original" } }
! { dg-final { cleanup-tree-dump "original" } }