Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / modfile39.f90
blobfbbd6ae4ce299330cc5679035b426ec1ea1aed04
1 ! RUN: %python %S/test_modfile.py %s %flang_fc1
2 ! Resolution of specification expression references to generic interfaces
3 ! that resolve to private specific functions.
5 module m1
6 interface gen
7 module procedure priv
8 end interface
9 private :: priv
10 contains
11 pure integer function priv(n)
12 integer, intent(in) :: n
13 priv = n
14 end function
15 end module
16 !Expect: m1.mod
17 !module m1
18 !interface gen
19 !procedure::priv
20 !end interface
21 !private::priv
22 !contains
23 !pure function priv(n)
24 !integer(4),intent(in)::n
25 !integer(4)::priv
26 !end
27 !end
29 module m2
30 use m1
31 contains
32 subroutine s(a)
33 real :: a(gen(1))
34 end subroutine
35 end module
36 !Expect: m2.mod
37 !module m2
38 !use m1,only:gen
39 !use m1,only:m1$m1$priv=>priv
40 !private::m1$m1$priv
41 !contains
42 !subroutine s(a)
43 !real(4)::a(1_8:int(m1$m1$priv(1_4),kind=8))
44 !end
45 !end
47 use m2
48 end