view gcc/testsuite/gfortran.dg/proc_ptr_result_4.f90 @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { 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