61 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12module m3 interface foo4 real function s1(x)5 real x6 end7 !ERROR: 's2' is not a module procedure8 module procedure s29 !ERROR: 's3' is not a procedure10 procedure s311 !ERROR: Procedure 's1' is already specified in generic 'foo'12 procedure s113 end interface14 interface15 real function s4(x,y)16 real, intent(in) :: x,y17 end function18 complex function s2(x,y)19 complex, intent(in) :: x,y20 end function21 end interface22 generic :: bar => s423 generic :: bar => s224 !ERROR: Procedure 's4' is already specified in generic 'bar'25 generic :: bar => s426 27 generic :: operator(.foo.)=> s428 generic :: operator(.foo.)=> s229 !ERROR: Procedure 's4' is already specified in generic 'OPERATOR(.foo.)'30 generic :: operator(.foo.)=> s431end module32 33module m234 interface35 integer function f(x, y)36 logical, intent(in) :: x, y37 end function38 end interface39 generic :: operator(+)=> f40 !ERROR: Procedure 'f' is already specified in generic 'OPERATOR(+)'41 generic :: operator(+)=> f42end43 44module m345 interface operator(.ge.)46 procedure f47 end interface48 interface operator(>=)49 !ERROR: Procedure 'f' is already specified in generic 'OPERATOR(.GE.)'50 procedure f51 end interface52 generic :: operator(>) => f53 !ERROR: Procedure 'f' is already specified in generic 'OPERATOR(>)'54 generic :: operator(.gt.) => f55contains56 logical function f(x, y) result(result)57 logical, intent(in) :: x, y58 result = .true.59 end60end61