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