1! { dg-do compile } 2! 3! PR 40541: Assignment checking for proc-pointer => proc-ptr-returning-function() 4! 5! Contributed by Tobias Burnus <burnus@gcc.gnu.org> 6 7program test 8 procedure(real), pointer :: p 9 p => f() ! { dg-error "Type mismatch in function result" } 10contains 11 function f() 12 pointer :: f 13 interface 14 logical(1) function f() 15 end function 16 end interface 17 f = .true._1 ! { dg-error "Illegal assignment" } 18 end function f 19end program test 20