1! { dg-do compile }
2!
3! PR fortran/57535
4!
5program test
6  implicit none
7  type t
8    integer :: ii = 55
9  end type t
10contains
11  function func2()
12    class(t), allocatable :: func2(:)
13    allocate(func2(3))
14    func2%ii = [111,222,333]
15  end function func2
16end program test
17