Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / modfile49.f90
blob9c48c8a480128dd5590d33bb32e256a7314a551d
1 ! RUN: %python %S/test_modfile.py %s %flang_fc1
2 ! Ensure that symbols and types needed to declare procedures and procedure pointers
3 ! are properly imported into interfaces.
4 module m
5 type :: t
6 end type
7 procedure(sin) :: ext
8 interface
9 subroutine subr(p1,p2)
10 import ext, t
11 procedure(ext) :: p1
12 procedure(type(t)), pointer :: p2
13 end subroutine
14 function fun() result(res)
15 import subr
16 procedure(subr), pointer :: res
17 end function
18 end interface
19 end module
21 !Expect: m.mod
22 !module m
23 !type::t
24 !end type
25 !intrinsic::sin
26 !procedure(sin)::ext
27 !interface
28 !subroutine subr(p1,p2)
29 !import::ext
30 !import::t
31 !procedure(ext)::p1
32 !procedure(type(t)),pointer::p2
33 !end
34 !end interface
35 !interface
36 !function fun() result(res)
37 !import::subr
38 !procedure(subr),pointer::res
39 !end
40 !end interface
41 !end