Debian Codegraph @

gcc/testsuite/gfortran.dg/allocatable_function_9.f90

raw
1 ! { dg-do run }
2 !
3 ! PR fortran/55603
4 ! Check that the allocatable result is properly freed after use.
5 !
6 ! Contributed by Damian Rouson <[email protected]>
7
8 type foo
9 end type
10 type(foo) a
11 a = bar()
12 contains
13 function bar()
14 type(foo), allocatable :: bar
15 allocate(bar)
16 end function
17 end