1! RUN: %S/test_symbols.sh %s %t %flang_fc1
2! REQUIRES: shell
3! Test host association in module subroutine and internal subroutine.
4
5!DEF: /m Module
6module m
7 !DEF: /m/t PUBLIC DerivedType
8 type :: t
9 end type
10 !REF: /m/t
11 !DEF: /m/x PUBLIC ObjectEntity TYPE(t)
12 type(t) :: x
13 interface
14  !DEF: /m/s3 MODULE, PUBLIC (Subroutine) Subprogram
15  !DEF: /m/s3/y ObjectEntity TYPE(t)
16  module subroutine s3(y)
17   !REF: /m/t
18   !REF: /m/s3/y
19   type(t) :: y
20  end subroutine
21 end interface
22contains
23 !DEF: /m/s PUBLIC (Subroutine) Subprogram
24 subroutine s
25  !REF: /m/t
26  !DEF: /m/s/y ObjectEntity TYPE(t)
27  type(t) :: y
28  !REF: /m/s/y
29  !REF: /m/x
30  y = x
31  !DEF: /m/s/s (Subroutine) HostAssoc
32  call s
33 contains
34  !DEF: /m/s/s2 (Subroutine) Subprogram
35  subroutine s2
36   !REF: /m/x
37   !REF: /m/s/y
38   !REF: /m/t
39   !REF: /m/s/s
40   import, only: x, y, t, s
41   !REF: /m/t
42   !DEF: /m/s/s2/z ObjectEntity TYPE(t)
43   type(t) :: z
44   !REF: /m/s/s2/z
45   !REF: /m/x
46   z = x
47   !REF: /m/s/s2/z
48   !DEF: /m/s/s2/y HostAssoc TYPE(t)
49   z = y
50   !REF: /m/s/s
51   call s
52  end subroutine
53 end subroutine
54end module
55