xref: /llvm-project/flang/test/Semantics/modfile49.f90 (revision 0c0b2ea98816067aea43f38892e5901c74271d40)
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.
4module m
5  type :: t
6  end type
7  abstract interface
8    subroutine iface
9    end
10  end interface
11  procedure(iface) :: ext
12  interface
13    subroutine subr(p1,p2)
14      import ext, t
15      procedure(ext) :: p1
16      procedure(type(t)), pointer :: p2
17    end subroutine
18    function fun() result(res)
19      import subr
20      procedure(subr), pointer :: res
21    end function
22  end interface
23end module
24
25!Expect: m.mod
26!module m
27!type::t
28!end type
29!abstract interface
30!subroutine iface()
31!end
32!end interface
33!procedure(iface)::ext
34!interface
35!subroutine subr(p1,p2)
36!import::ext
37!import::t
38!procedure(ext)::p1
39!procedure(type(t)),pointer::p2
40!end
41!end interface
42!interface
43!function fun() result(res)
44!import::subr
45!procedure(subr),pointer::res
46!end
47!end interface
48!end
49