xref: /llvm-project/flang/test/Semantics/symbol27.f90 (revision 2b7a928dd97476aac86fbae25a7a8e26b4ced738)
1! RUN: %python %S/test_symbols.py %s %flang_fc1
2!DEF: /m1a Module
3module m1a
4 !DEF: /m1a/foo PUBLIC DerivedType
5 type :: foo
6  !DEF: /m1a/foo/j ObjectEntity INTEGER(4)
7  integer :: j
8 end type
9end module
10!DEF: /m1b Module
11module m1b
12 !DEF: /m1b/foo PUBLIC (Function) Generic
13 interface foo
14  !DEF: /m1b/bar PUBLIC (Function) Subprogram REAL(4)
15  module procedure :: bar
16 end interface
17contains
18 !REF: /m1b/bar
19 function bar()
20 end function
21end module
22!DEF: /test1a (Subroutine) Subprogram
23subroutine test1a
24 !REF: /m1a
25 use :: m1a
26 !REF: /m1b
27 use :: m1b
28 !DEF: /test1a/foo (Function) Generic
29 !DEF: /test1a/x ObjectEntity TYPE(foo)
30 type(foo) :: x
31 !REF: /m1a/foo
32 !REF: /m1b/bar
33 print *, foo(1), foo()
34end subroutine
35!DEF: /test1b (Subroutine) Subprogram
36subroutine test1b
37 !REF: /m1b
38 use :: m1b
39 !REF: /m1a
40 use :: m1a
41 !DEF: /test1b/foo (Function) Generic
42 !DEF: /test1b/x ObjectEntity TYPE(foo)
43 type(foo) :: x
44 !REF: /m1a/foo
45 !REF: /m1b/bar
46 print *, foo(1), foo()
47end subroutine
48