summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/proc_ptr_result_5.f90
blob: 0e60cbb2a81027f6c3e33ff3460dd4ce6d787a16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! { dg-do compile }
!
! PR 40541: Assignment checking for proc-pointer => proc-ptr-returning-function()
!
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>

program test
  procedure(real), pointer :: p
  p => f()  ! { dg-error "Type/kind mismatch in return value" }
contains
 function f()
   pointer :: f
   interface
     logical(1) function f()
     end function
   end interface
   f = .true._1
 end function f
end program test