Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / modfile46.f90
blob13ed0c763fcba827b9ea222471a92c17e3ea9599
1 ! RUN: %python %S/test_modfile.py %s %flang_fc1
2 ! Ensure that interfaces, which are internal to procedures and are used to
3 ! define the interface of dummy or return value procedures, are included in
4 ! .mod files.
5 module m
6 implicit none
7 contains
8 function f(x)
9 real, intent(in) :: x
10 abstract interface
11 subroutine used_int(x, p)
12 implicit none
13 real, intent(out) :: x
14 interface
15 subroutine inner_int(x)
16 implicit none
17 real, intent(out) :: x
18 end subroutine inner_int
19 end interface
20 procedure(inner_int) :: p
21 end subroutine used_int
23 pure logical function unused_int(i)
24 implicit none
25 integer, intent(in) :: i
26 end function unused_int
27 end interface
28 procedure(used_int), pointer :: f
30 f => null()
31 contains
32 subroutine internal()
33 end subroutine internal
34 end function f
35 end module m
37 !Expect: m.mod
38 !module m
39 !contains
40 !function f(x)
41 !real(4),intent(in)::x
42 !abstract interface
43 !subroutine used_int(x,p)
44 !real(4),intent(out)::x
45 !interface
46 !subroutine inner_int(x)
47 !real(4),intent(out)::x
48 !end
49 !end interface
50 !procedure(inner_int)::p
51 !end
52 !end interface
53 !procedure(used_int),pointer::f
54 !end
55 !end