Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / resolve115.f90
blob7700b5964f0a9c2c1a39a9877053f9743bf497ec
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Ensures that a generic's shadowed procedure or derived type
3 ! can be overridden by a valid interior interface definition
4 ! in some cases.
6 module m1
7 contains
8 subroutine foo
9 end subroutine
10 subroutine test
11 interface foo
12 subroutine foo(n)
13 integer, intent(in) :: n
14 end subroutine
15 end interface
16 call foo(1)
17 end subroutine
18 end module
20 module m2
21 contains
22 subroutine test
23 interface foo
24 subroutine foo(n)
25 integer, intent(in) :: n
26 end subroutine
27 end interface
28 call foo(1)
29 end subroutine
30 subroutine foo
31 end subroutine
32 end module
34 module m3
35 interface
36 subroutine foo
37 end subroutine
38 end interface
39 contains
40 subroutine test
41 interface foo
42 subroutine foo(n)
43 integer, intent(in) :: n
44 end subroutine
45 end interface
46 call foo(1)
47 end subroutine
48 end module
50 module m4a
51 contains
52 subroutine foo
53 end subroutine
54 end module
55 module m4b
56 use m4a
57 contains
58 subroutine test
59 interface foo
60 subroutine foo(n)
61 integer, intent(in) :: n
62 end subroutine
63 end interface
64 call foo(1)
65 end subroutine
66 end module
68 module m5
69 type bar
70 end type
71 contains
72 subroutine test
73 interface bar
74 real function bar()
75 end function
76 end interface
77 print *, bar()
78 end subroutine
79 end module