! { dg-do compile } ! ! Contributed by Gerhard Steinmetz ! module m implicit none type t procedure(f), pointer, nopass :: g end type contains function f() character(:), allocatable :: f f = 'abc' end subroutine s type(t) :: z z%g = 'x' ! { dg-error "is a procedure pointer" } if ( z%g() /= 'abc' ) stop end end program p use m implicit none call s end