xref: /llvm-project/flang/test/Semantics/resolve15.f90 (revision a3e9d3c2c7e9f8766bf03c63e43675258cc611ee)
1! RUN: %python %S/test_errors.py %s %flang_fc1
2module m
3  real :: var
4  interface i
5    !ERROR: 'var' is not a procedure
6    procedure :: sub, var
7    !ERROR: 'bad' is not a procedure
8    procedure :: bad
9  end interface
10  interface operator(.foo.)
11    !ERROR: 'var' is not a procedure
12    procedure :: var
13    !ERROR: OPERATOR(.foo.) procedure 'sub' must be a function
14    procedure :: sub
15    !ERROR: 'bad' is not a procedure
16    procedure :: bad
17  end interface
18contains
19  subroutine sub
20  end
21end
22
23subroutine s
24  interface i
25    !ERROR: 'sub' is not a module procedure
26    module procedure :: sub
27  end interface
28  interface assignment(=)
29    !ERROR: 'sub' is not a module procedure
30    module procedure :: sub
31  end interface
32contains
33  subroutine sub(x, y)
34    real, intent(out) :: x
35    logical, intent(in) :: y
36  end
37end
38
39module m2
40  interface
41    module subroutine specific
42    end subroutine
43  end interface
44  interface generic
45     module procedure specific
46  end interface
47end module
48