1! { dg-do compile }
2!
3! PR fortran/45170
4! PR fortran/52158
5!
6! Contributed by Damian Rouson
7
8module speaker_class
9  type speaker
10  contains
11    procedure :: speak
12  end type
13contains
14  function speak(this)
15    class(speaker) ,intent(in) :: this
16    character(:) ,allocatable :: speak
17  end function
18  subroutine say_something(somebody)
19    class(speaker) :: somebody
20    print *,somebody%speak()
21  end subroutine
22end module
23
24