1! RUN: %S/test_modfile.sh %s %t %f18
2! Test modfiles for entities with initialization
3module m
4  integer, parameter :: k8 = 8
5  integer(8), parameter :: k4 = k8/2
6  integer, parameter :: k1 = 1
7  integer(k8), parameter :: i = 2_k8
8  real :: r = 2.0_k4
9  character(10, kind=k1) :: c = k1_"asdf"
10  character(10), parameter :: c2 = k1_"qwer"
11  complex*16, parameter :: z = (1.0_k8, 2.0_k8)
12  complex*16, parameter :: zn = (-1.0_k8, 2.0_k8)
13  type t
14    integer :: a = 123
15    type(t), pointer :: b => null()
16  end type
17  type(t), parameter :: x = t(456)
18  type(t), parameter :: y = t(789, null())
19end
20
21!Expect: m.mod
22!module m
23!  integer(4),parameter::k8=8_4
24!  integer(8),parameter::k4=4_8
25!  integer(4),parameter::k1=1_4
26!  integer(8),parameter::i=2_8
27!  real(4)::r
28!  character(10_4,1)::c
29!  character(10_4,1),parameter::c2="qwer      "
30!  complex(8),parameter::z=(1._8,2._8)
31!  complex(8),parameter::zn=(-1._8,2._8)
32!  type::t
33!    integer(4)::a=123_4
34!    type(t),pointer::b=>NULL()
35!  end type
36!  intrinsic::null
37!  type(t),parameter::x=t(a=456_4,b=NULL())
38!  type(t),parameter::y=t(a=789_4,b=NULL())
39!end
40