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