[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / kinds03.f90
blob751d4a9ffa3cbbd20d0536e6748510c98efb6420
1 ! RUN: %python %S/test_symbols.py %s %flang_fc1
2 !DEF: /MainProgram1/ipdt DerivedType
3 !DEF: /MainProgram1/ipdt/k TypeParam INTEGER(4)
4 type :: ipdt(k)
5 !REF: /MainProgram1/ipdt/k
6 integer, kind :: k
7 !REF: /MainProgram1/ipdt/k
8 !DEF: /MainProgram1/ipdt/x ObjectEntity INTEGER(int(int(k,kind=4),kind=8))
9 integer(kind=k) :: x
10 end type ipdt
11 !DEF: /MainProgram1/rpdt DerivedType
12 !DEF: /MainProgram1/rpdt/k TypeParam INTEGER(4)
13 type :: rpdt(k)
14 !REF: /MainProgram1/rpdt/k
15 integer, kind :: k
16 !REF: /MainProgram1/rpdt/k
17 !DEF: /MainProgram1/rpdt/x ObjectEntity REAL(int(int(k,kind=4),kind=8))
18 real(kind=k) :: x
19 end type rpdt
20 !DEF: /MainProgram1/zpdt DerivedType
21 !DEF: /MainProgram1/zpdt/k TypeParam INTEGER(4)
22 type :: zpdt(k)
23 !REF: /MainProgram1/zpdt/k
24 integer, kind :: k
25 !REF: /MainProgram1/zpdt/k
26 !DEF: /MainProgram1/zpdt/x ObjectEntity COMPLEX(int(int(k,kind=4),kind=8))
27 complex(kind=k) :: x
28 end type zpdt
29 !DEF: /MainProgram1/lpdt DerivedType
30 !DEF: /MainProgram1/lpdt/k TypeParam INTEGER(4)
31 type :: lpdt(k)
32 !REF: /MainProgram1/lpdt/k
33 integer, kind :: k
34 !REF: /MainProgram1/lpdt/k
35 !DEF: /MainProgram1/lpdt/x ObjectEntity LOGICAL(int(int(k,kind=4),kind=8))
36 logical(kind=k) :: x
37 end type lpdt
38 !REF: /MainProgram1/ipdt
39 !DEF: /MainProgram1/i1 ObjectEntity TYPE(ipdt(k=1_4))
40 type(ipdt(1)) :: i1
41 !REF: /MainProgram1/ipdt
42 !DEF: /MainProgram1/i2 ObjectEntity TYPE(ipdt(k=2_4))
43 type(ipdt(2)) :: i2
44 !REF: /MainProgram1/ipdt
45 !DEF: /MainProgram1/i4 ObjectEntity TYPE(ipdt(k=4_4))
46 type(ipdt(4)) :: i4
47 !REF: /MainProgram1/ipdt
48 !DEF: /MainProgram1/i8 ObjectEntity TYPE(ipdt(k=8_4))
49 type(ipdt(8)) :: i8
50 !REF: /MainProgram1/ipdt
51 !DEF: /MainProgram1/i16 ObjectEntity TYPE(ipdt(k=16_4))
52 type(ipdt(16)) :: i16
53 !REF: /MainProgram1/rpdt
54 !DEF: /MainProgram1/a2 ObjectEntity TYPE(rpdt(k=2_4))
55 type(rpdt(2)) :: a2
56 !REF: /MainProgram1/rpdt
57 !DEF: /MainProgram1/a4 ObjectEntity TYPE(rpdt(k=4_4))
58 type(rpdt(4)) :: a4
59 !REF: /MainProgram1/rpdt
60 !DEF: /MainProgram1/a8 ObjectEntity TYPE(rpdt(k=8_4))
61 type(rpdt(8)) :: a8
62 !REF: /MainProgram1/rpdt
63 !DEF: /MainProgram1/a16 ObjectEntity TYPE(rpdt(k=16_4))
64 type(rpdt(16)) :: a16
65 !REF: /MainProgram1/zpdt
66 !DEF: /MainProgram1/z2 ObjectEntity TYPE(zpdt(k=2_4))
67 type(zpdt(2)) :: z2
68 !REF: /MainProgram1/zpdt
69 !DEF: /MainProgram1/z4 ObjectEntity TYPE(zpdt(k=4_4))
70 type(zpdt(4)) :: z4
71 !REF: /MainProgram1/zpdt
72 !DEF: /MainProgram1/z8 ObjectEntity TYPE(zpdt(k=8_4))
73 type(zpdt(8)) :: z8
74 !REF: /MainProgram1/zpdt
75 !DEF: /MainProgram1/z16 ObjectEntity TYPE(zpdt(k=16_4))
76 type(zpdt(16)) :: z16
77 !REF: /MainProgram1/lpdt
78 !DEF: /MainProgram1/l1 ObjectEntity TYPE(lpdt(k=1_4))
79 type(lpdt(1)) :: l1
80 !REF: /MainProgram1/lpdt
81 !DEF: /MainProgram1/l2 ObjectEntity TYPE(lpdt(k=2_4))
82 type(lpdt(2)) :: l2
83 !REF: /MainProgram1/lpdt
84 !DEF: /MainProgram1/l4 ObjectEntity TYPE(lpdt(k=4_4))
85 type(lpdt(4)) :: l4
86 !REF: /MainProgram1/lpdt
87 !DEF: /MainProgram1/l8 ObjectEntity TYPE(lpdt(k=8_4))
88 type(lpdt(8)) :: l8
89 end program