2011-05-23 Tom de Vries <tom@codesourcery.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / proc_ptr_result_5.f90
blob0e60cbb2a81027f6c3e33ff3460dd4ce6d787a16
1 ! { dg-do compile }
3 ! PR 40541: Assignment checking for proc-pointer => proc-ptr-returning-function()
5 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
7 program test
8 procedure(real), pointer :: p
9 p => f() ! { dg-error "Type/kind mismatch in return value" }
10 contains
11 function f()
12 pointer :: f
13 interface
14 logical(1) function f()
15 end function
16 end interface
17 f = .true._1
18 end function f
19 end program test