1! { dg-do compile }
2!
3! PR fortran/47377
4!
5! Contributed by <thenlich@users.sourceforge.net>
6!
7program testgferr
8    real, pointer :: y
9    y => f()  ! { dg-error "must deliver a pointer result" }
10contains
11    function f()
12      real :: f
13      f = 5
14    end function f
15end program testgferr
16