coarray_41.f90: Add "-latomic" option if libatomic_available.
[official-gcc.git] / gcc / testsuite / gfortran.dg / allocatable_function_9.f90
blob483c1ba278c0bb240fad297110eaeef525749426
1 ! { dg-do run }
3 ! PR fortran/55603
4 ! Check that the allocatable result is properly freed after use.
6 ! Contributed by Damian Rouson <damian@sourceryinstitute.org>
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