blob: 69bf140b818c7775a6d3c8749acfd50dce9c0748 [file] [log] [blame]
! { dg-do compile }
!
! PR 38290: Procedure pointer assignment checking.
!
! Test case found at http://de.wikibooks.org/wiki/Fortran:_Fortran_2003:_Zeiger
! Adapted by Janus Weil <janus@gcc.gnu.org>
program bsp
implicit none
abstract interface
subroutine up()
end subroutine up
end interface
procedure( up ) , pointer :: pptr
procedure(isign), pointer :: q
! TODO. See PR 38290.
!pptr => add ! { "Interfaces don't match" }
q => add
print *, pptr() ! { dg-error "is not a function" }
contains
function add( a, b )
integer :: add
integer, intent( in ) :: a, b
add = a + b
end function add
end program bsp