2017-11-04 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr81735.f90
blob6aae203aa0fa3275c72c940ae7561bf33058be4c
1 ! { dg-do compile }
2 ! { dg-options "-fdump-tree-original" }
4 ! Contributed by Danila <flashmozzg@gmail.com>
6 program fooprog
7 implicit none
8 type FooType
9 integer, allocatable :: x
10 end type FooType
12 type(FooType), pointer :: bar
14 bar => foo()
16 contains
17 function foo() result(res)
18 type(FooType), pointer :: res
20 character(:), allocatable :: rt
21 rt = ""
22 res => null()
23 end function foo
24 end program fooprog
25 ! { dg-final { scan-tree-dump-times "__builtin_free" 1 "original" } }