1! RUN: %S/test_modfile.sh %s %t %f18
2! Check correct modfile generation for type with private component.
3module m
4  integer :: i
5  integer, private :: j
6  type :: t
7    integer :: i
8    integer, private :: j
9  end type
10  type, private :: u
11  end type
12  type(t) :: x
13end
14
15!Expect: m.mod
16!module m
17!integer(4)::i
18!integer(4),private::j
19!type::t
20!integer(4)::i
21!integer(4),private::j
22!end type
23!type,private::u
24!end type
25!type(t)::x
26!end
27
28! Check correct modfile generation for type with private module procedure.
29
30module m2
31  private :: s1
32contains
33  subroutine s1()
34  end
35  subroutine s2()
36  end
37end
38
39!Expect: m2.mod
40!module m2
41! private::s1
42!contains
43! subroutine s1()
44! end
45! subroutine s2()
46! end
47!end
48
49module m3
50  private
51  public :: f1
52contains
53  real function f1()
54  end
55  real function f2()
56  end
57end
58
59!Expect: m3.mod
60!module m3
61! private::f2
62!contains
63! function f1()
64!  real(4)::f1
65! end
66! function f2()
67!  real(4)::f2
68! end
69!end
70
71! Test optional dummy procedure
72module m4
73contains
74  subroutine s(f)
75    interface
76      logical recursive function f()
77        implicit none
78      end function
79    end interface
80    optional f
81  end
82end
83
84!Expect: m4.mod
85!module m4
86!contains
87! subroutine s(f)
88!  optional::f
89!  interface
90!   recursive function f()
91!    logical(4)::f
92!   end
93!  end interface
94! end
95!end
96