aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/proc_ptr_result_4.f90
blob: 5dd67bfe2bb5e7ae750dadc16f0c346bfe7104eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
! { dg-do compile }
!
! PR 40451: [F03] procedure pointer assignment rejected 
!
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>

contains

  function f()
    intrinsic :: sin
    abstract interface
      pure real function sin_interf(x)
        real, intent(in) :: x
      end function sin_interf
    end interface
    ! We cannot use "sin" directly as it is ELEMENTAL
    procedure(sin_interf), pointer :: f
    f => sin
  end function f

end