1! { dg-do compile } 2! 3! PR39850: Too strict checking for procedures as actual argument 4! 5! Original test case by Tobias Burnus <burnus@gcc.gnu.org> 6! Modified by Janus Weil <janus@gcc.gnu.org> 7 8real function func() 9 print *,"func" 10 func = 42.0 11end function func 12 13program test 14 external func1,func2,func3,func4 ! subroutine or implicitly typed real function 15 call sub1(func1) 16 call sub2(func2) 17 call sub1(func3) 18 call sub2(func3) ! { dg-error "is not a subroutine" } 19 call sub2(func4) 20 call sub1(func4) ! { dg-error "is not a function" } 21contains 22 subroutine sub1(a1) 23 interface 24 real function a1() 25 end function 26 end interface 27 print *, a1() 28 end subroutine sub1 29 subroutine sub2(a2) 30 interface 31 subroutine a2 32 end subroutine 33 end interface 34 call a2() 35 end subroutine 36end 37 38