Debian Codegraph @

gcc/testsuite/gfortran.dg/class_79.f90

raw
1 !{ dg-do run }
2
3 ! Check double free on array constructor in argument list is fixed.
4 ! Contributed by Damian Rouson <[email protected]>
5 program pr119349
6 implicit none
7
8 type string_t
9 character(len=:), allocatable :: string_
10 end type
11
12 print *, true([string()])
13
14 contains
15
16 type(string_t) function string()
17 string%string_ = ""
18 end function
19
20 logical elemental function true(rhs)
21 class(string_t), intent(in) :: rhs
22 true = .true.
23 end function
24
25 end program