1! { dg-do run } 2! 3! Tests the fix for PR49630 comment #3. 4! 5! Contributed by Janus Weil <janus@gcc.gnu.org> 6! 7module abc 8 implicit none 9 10 type::abc_type 11 contains 12 procedure::abc_function 13 end type abc_type 14 15contains 16 17 function abc_function(this) 18 class(abc_type),intent(in)::this 19 character(:),allocatable::abc_function 20 allocate(abc_function,source="hello") 21 end function abc_function 22 23 subroutine do_something(this) 24 class(abc_type),intent(in)::this 25 if (this%abc_function() .ne. "hello") call abort 26 end subroutine do_something 27 28end module abc 29 30 31 use abc 32 type(abc_type) :: a 33 call do_something(a) 34end 35