1! RUN: %S/test_errors.sh %s %t %f18 2subroutine test1 3 !ERROR: Generic interface 'foo' has both a function and a subroutine 4 interface foo 5 subroutine s1(x) 6 end subroutine 7 subroutine s2(x, y) 8 end subroutine 9 function f() 10 end function 11 end interface 12end subroutine 13 14subroutine test2 15 !ERROR: Generic interface 'foo' has both a function and a subroutine 16 interface foo 17 function f1(x) 18 end function 19 subroutine s() 20 end subroutine 21 function f2(x, y) 22 end function 23 end interface 24end subroutine 25 26module test3 27 !ERROR: Generic interface 'foo' has both a function and a subroutine 28 interface foo 29 module procedure s 30 module procedure f 31 end interface 32contains 33 subroutine s(x) 34 end subroutine 35 function f() 36 end function 37end module 38 39subroutine test4 40 type foo 41 end type 42 !ERROR: Generic interface 'foo' may only contain functions due to derived type with same name 43 interface foo 44 subroutine s() 45 end subroutine 46 end interface 47end subroutine 48 49subroutine test5 50 interface foo 51 function f1() 52 end function 53 end interface 54 interface bar 55 subroutine s1() 56 end subroutine 57 subroutine s2(x) 58 end subroutine 59 end interface 60 !ERROR: Cannot call function 'foo' like a subroutine 61 call foo() 62 !ERROR: Cannot call subroutine 'bar' like a function 63 x = bar() 64end subroutine 65