1 // Test code generation to FIR of hlfir.designate operations
2 // without component reference.
3 // RUN: fir-opt %s -convert-hlfir-to-fir | FileCheck %s
5 func.func @array_ref(%arg0: !fir.box<!fir.array<?xf32>>, %arg1: !fir.ref<i64>) {
6 %0:2 = hlfir.declare %arg1 {uniq_name = "n"} : (!fir.ref<i64>) -> (!fir.ref<i64>, !fir.ref<i64>)
7 %1:2 = hlfir.declare %arg0 {uniq_name = "x"} : (!fir.box<!fir.array<?xf32>>) -> (!fir.box<!fir.array<?xf32>>, !fir.box<!fir.array<?xf32>>)
8 %2 = fir.load %0#0 : !fir.ref<i64>
9 %3 = hlfir.designate %1#0 (%2) : (!fir.box<!fir.array<?xf32>>, i64) -> !fir.ref<f32>
12 // CHECK-LABEL: func.func @array_ref(
13 // CHECK-SAME: %[[VAL_0:.*]]: !fir.box<!fir.array<?xf32>>,
14 // CHECK-SAME: %[[VAL_1:.*]]: !fir.ref<i64>) {
15 // CHECK: %[[VAL_2:.*]] = fir.declare %[[VAL_1]] {uniq_name = "n"} : (!fir.ref<i64>) -> !fir.ref<i64>
16 // CHECK: %[[VAL_3:.*]] = fir.declare %[[VAL_0]] {uniq_name = "x"} : (!fir.box<!fir.array<?xf32>>) -> !fir.box<!fir.array<?xf32>>
17 // CHECK: %[[VAL_4:.*]] = fir.rebox %[[VAL_3]] : (!fir.box<!fir.array<?xf32>>) -> !fir.box<!fir.array<?xf32>>
18 // CHECK: %[[VAL_5:.*]] = fir.load %[[VAL_2]] : !fir.ref<i64>
19 // CHECK: %[[VAL_6:.*]] = fir.array_coor %[[VAL_4]] %[[VAL_5]] : (!fir.box<!fir.array<?xf32>>, i64) -> !fir.ref<f32>
22 func.func @char_array_ref(%arg0: !fir.box<!fir.array<?x!fir.char<1,?>>>, %arg1: !fir.ref<i32>) {
23 %0:2 = hlfir.declare %arg1 {uniq_name = "n"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
24 %1:2 = hlfir.declare %arg0 {uniq_name = "x"} : (!fir.box<!fir.array<?x!fir.char<1,?>>>) -> (!fir.box<!fir.array<?x!fir.char<1,?>>>, !fir.box<!fir.array<?x!fir.char<1,?>>>)
25 %2 = fir.box_elesize %1#1 : (!fir.box<!fir.array<?x!fir.char<1,?>>>) -> index
26 %c10 = arith.constant 10 : index
27 %3 = hlfir.designate %1#0 (%c10) typeparams %2 : (!fir.box<!fir.array<?x!fir.char<1,?>>>, index, index) -> !fir.boxchar<1>
30 // CHECK-LABEL: func.func @char_array_ref(
31 // CHECK-SAME: %[[VAL_0:.*]]: !fir.box<!fir.array<?x!fir.char<1,?>>>,
32 // CHECK-SAME: %[[VAL_1:.*]]: !fir.ref<i32>) {
33 // CHECK: %[[VAL_2:.*]] = fir.declare %[[VAL_1]] {uniq_name = "n"} : (!fir.ref<i32>) -> !fir.ref<i32>
34 // CHECK: %[[VAL_3:.*]] = fir.declare %[[VAL_0]] {uniq_name = "x"} : (!fir.box<!fir.array<?x!fir.char<1,?>>>) -> !fir.box<!fir.array<?x!fir.char<1,?>>>
35 // CHECK: %[[VAL_4:.*]] = fir.rebox %[[VAL_3]] : (!fir.box<!fir.array<?x!fir.char<1,?>>>) -> !fir.box<!fir.array<?x!fir.char<1,?>>>
36 // CHECK: %[[VAL_5:.*]] = fir.box_elesize %[[VAL_4]] : (!fir.box<!fir.array<?x!fir.char<1,?>>>) -> index
37 // CHECK: %[[VAL_6:.*]] = arith.constant 10 : index
38 // CHECK: %[[VAL_7:.*]] = fir.array_coor %[[VAL_4]] %[[VAL_6]] : (!fir.box<!fir.array<?x!fir.char<1,?>>>, index) -> !fir.ref<!fir.char<1,?>>
39 // CHECK: %[[VAL_8:.*]] = fir.emboxchar %[[VAL_7]], %[[VAL_5]] : (!fir.ref<!fir.char<1,?>>, index) -> !fir.boxchar<1>
42 func.func @char_array_ref_cst_len(%arg0: !fir.box<!fir.array<?x!fir.char<1,5>>>, %arg1: !fir.ref<i32>) {
43 %0:2 = hlfir.declare %arg1 {uniq_name = "n"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
44 %c5 = arith.constant 5 : index
45 %1:2 = hlfir.declare %arg0 typeparams %c5 {uniq_name = "x"} : (!fir.box<!fir.array<?x!fir.char<1,5>>>, index) -> (!fir.box<!fir.array<?x!fir.char<1,5>>>, !fir.box<!fir.array<?x!fir.char<1,5>>>)
46 %c10 = arith.constant 10 : index
47 %2 = hlfir.designate %1#0 (%c10) typeparams %c5 : (!fir.box<!fir.array<?x!fir.char<1,5>>>, index, index) -> !fir.ref<!fir.char<1,5>>
50 // CHECK-LABEL: func.func @char_array_ref_cst_len(
51 // CHECK-SAME: %[[VAL_0:.*]]: !fir.box<!fir.array<?x!fir.char<1,5>>>,
52 // CHECK-SAME: %[[VAL_1:.*]]: !fir.ref<i32>) {
53 // CHECK: %[[VAL_2:.*]] = fir.declare %[[VAL_1]] {uniq_name = "n"} : (!fir.ref<i32>) -> !fir.ref<i32>
54 // CHECK: %[[VAL_3:.*]] = arith.constant 5 : index
55 // CHECK: %[[VAL_4:.*]] = fir.declare %[[VAL_0]] typeparams %[[VAL_3]] {uniq_name = "x"} : (!fir.box<!fir.array<?x!fir.char<1,5>>>, index) -> !fir.box<!fir.array<?x!fir.char<1,5>>>
56 // CHECK: %[[VAL_5:.*]] = fir.rebox %[[VAL_4]] : (!fir.box<!fir.array<?x!fir.char<1,5>>>) -> !fir.box<!fir.array<?x!fir.char<1,5>>>
57 // CHECK: %[[VAL_6:.*]] = arith.constant 10 : index
58 // CHECK: %[[VAL_7:.*]] = fir.array_coor %[[VAL_5]] %[[VAL_6]] : (!fir.box<!fir.array<?x!fir.char<1,5>>>, index) -> !fir.ref<!fir.char<1,5>>
61 func.func @char_array_ref_3(%arg0: !fir.ref<!fir.array<100x!fir.char<1,?>>>, %arg1: !fir.ref<i32>) {
62 %0:2 = hlfir.declare %arg1 {uniq_name = "n"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
63 %c5 = arith.constant 5 : index
64 %c100 = arith.constant 100 : index
65 %sh = fir.shape %c100 : (index) -> !fir.shape<1>
66 %1:2 = hlfir.declare %arg0(%sh) typeparams %c5 {uniq_name = "x"} : (!fir.ref<!fir.array<100x!fir.char<1,?>>>, !fir.shape<1>, index) -> (!fir.box<!fir.array<100x!fir.char<1,?>>>, !fir.ref<!fir.array<100x!fir.char<1,?>>>)
67 %c10 = arith.constant 10 : index
68 %3 = hlfir.designate %1#0 (%c10) typeparams %c5 : (!fir.box<!fir.array<100x!fir.char<1,?>>>, index, index) -> !fir.boxchar<1>
71 // CHECK-LABEL: func.func @char_array_ref_3(
72 // CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<!fir.array<100x!fir.char<1,?>>>,
73 // CHECK-SAME: %[[VAL_1:.*]]: !fir.ref<i32>) {
74 // CHECK: %[[VAL_2:.*]] = fir.declare %[[VAL_1]] {uniq_name = "n"} : (!fir.ref<i32>) -> !fir.ref<i32>
75 // CHECK: %[[VAL_3:.*]] = arith.constant 5 : index
76 // CHECK: %[[VAL_4:.*]] = arith.constant 100 : index
77 // CHECK: %[[VAL_5:.*]] = fir.shape %[[VAL_4]] : (index) -> !fir.shape<1>
78 // CHECK: %[[VAL_6:.*]] = fir.declare %[[VAL_0]](%[[VAL_5]]) typeparams %[[VAL_3]] {uniq_name = "x"} : (!fir.ref<!fir.array<100x!fir.char<1,?>>>, !fir.shape<1>, index) -> !fir.ref<!fir.array<100x!fir.char<1,?>>>
79 // CHECK: %[[VAL_8:.*]] = arith.constant 10 : index
80 // CHECK: %[[VAL_9:.*]] = fir.array_coor %[[VAL_6]](%[[VAL_5]]) %[[VAL_8]] typeparams %[[VAL_3]] : (!fir.ref<!fir.array<100x!fir.char<1,?>>>, !fir.shape<1>, index, index) -> !fir.ref<!fir.char<1,?>>
81 // CHECK: %[[VAL_10:.*]] = fir.emboxchar %[[VAL_9]], %[[VAL_3]] : (!fir.ref<!fir.char<1,?>>, index) -> !fir.boxchar<1>
84 func.func @array_section(%arg0: !fir.ref<!fir.array<10xf32>>) {
85 %c10 = arith.constant 10 : index
86 %0 = fir.shape %c10 : (index) -> !fir.shape<1>
87 %1:2 = hlfir.declare %arg0(%0) {uniq_name = "x"} : (!fir.ref<!fir.array<10xf32>>, !fir.shape<1>) -> (!fir.ref<!fir.array<10xf32>>, !fir.ref<!fir.array<10xf32>>)
88 %c2 = arith.constant 2 : index
89 %c8 = arith.constant 8 : index
90 %c3 = arith.constant 3 : index
91 %2 = fir.shape %c3 : (index) -> !fir.shape<1>
92 %3 = hlfir.designate %1#0 (%c2:%c8:%c3) shape %2 : (!fir.ref<!fir.array<10xf32>>, index, index, index, !fir.shape<1>) -> !fir.box<!fir.array<3xf32>>
95 // CHECK-LABEL: func.func @array_section(
96 // CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<!fir.array<10xf32>>) {
97 // CHECK: %[[VAL_1:.*]] = arith.constant 10 : index
98 // CHECK: %[[VAL_2:.*]] = fir.shape %[[VAL_1]] : (index) -> !fir.shape<1>
99 // CHECK: %[[VAL_3:.*]] = fir.declare %[[VAL_0]](%[[VAL_2]]) {uniq_name = "x"} : (!fir.ref<!fir.array<10xf32>>, !fir.shape<1>) -> !fir.ref<!fir.array<10xf32>>
100 // CHECK: %[[VAL_4:.*]] = arith.constant 2 : index
101 // CHECK: %[[VAL_5:.*]] = arith.constant 8 : index
102 // CHECK: %[[VAL_6:.*]] = arith.constant 3 : index
103 // CHECK: %[[VAL_7:.*]] = fir.shape %[[VAL_6]] : (index) -> !fir.shape<1>
104 // CHECK: %[[VAL_8:.*]] = fir.undefined index
105 // CHECK: %[[VAL_9:.*]] = fir.slice %[[VAL_4]], %[[VAL_5]], %[[VAL_6]] : (index, index, index) -> !fir.slice<1>
106 // CHECK: %[[VAL_10:.*]] = fir.embox %[[VAL_3]](%[[VAL_2]]) {{\[}}%[[VAL_9]]] : (!fir.ref<!fir.array<10xf32>>, !fir.shape<1>, !fir.slice<1>) -> !fir.box<!fir.array<3xf32>>
109 func.func @array_section_2(%arg0: !fir.box<!fir.array<?xf32>>, %arg1: !fir.ref<i64>) {
110 %0:2 = hlfir.declare %arg1 {uniq_name = "n"} : (!fir.ref<i64>) -> (!fir.ref<i64>, !fir.ref<i64>)
111 %1:2 = hlfir.declare %arg0 {uniq_name = "x"} : (!fir.box<!fir.array<?xf32>>) -> (!fir.box<!fir.array<?xf32>>, !fir.box<!fir.array<?xf32>>)
112 %2 = fir.load %0#0 : !fir.ref<i64>
113 %c0 = arith.constant 0 : index
114 %3:3 = fir.box_dims %1#1, %c0 : (!fir.box<!fir.array<?xf32>>, index) -> (index, index, index)
115 %4 = fir.convert %2 : (i64) -> index
116 %c3 = arith.constant 3 : index
117 %c42 = arith.constant 42 : index
118 %5 = fir.shape %c42 : (index) -> !fir.shape<1>
119 %6 = hlfir.designate %1#0 (%4:%3#1:%c3) shape %5 : (!fir.box<!fir.array<?xf32>>, index, index, index, !fir.shape<1>) -> !fir.box<!fir.array<?xf32>>
122 // CHECK-LABEL: func.func @array_section_2(
123 // CHECK-SAME: %[[VAL_0:.*]]: !fir.box<!fir.array<?xf32>>,
124 // CHECK-SAME: %[[VAL_1:.*]]: !fir.ref<i64>) {
125 // CHECK: %[[VAL_2:.*]] = fir.declare %[[VAL_1]] {uniq_name = "n"} : (!fir.ref<i64>) -> !fir.ref<i64>
126 // CHECK: %[[VAL_3:.*]] = fir.declare %[[VAL_0]] {uniq_name = "x"} : (!fir.box<!fir.array<?xf32>>) -> !fir.box<!fir.array<?xf32>>
127 // CHECK: %[[VAL_4:.*]] = fir.rebox %[[VAL_3]] : (!fir.box<!fir.array<?xf32>>) -> !fir.box<!fir.array<?xf32>>
128 // CHECK: %[[VAL_5:.*]] = fir.load %[[VAL_2]] : !fir.ref<i64>
129 // CHECK: %[[VAL_6:.*]] = arith.constant 0 : index
130 // CHECK: %[[VAL_7:.*]]:3 = fir.box_dims %[[VAL_4]], %[[VAL_6]] : (!fir.box<!fir.array<?xf32>>, index) -> (index, index, index)
131 // CHECK: %[[VAL_8:.*]] = fir.convert %[[VAL_5]] : (i64) -> index
132 // CHECK: %[[VAL_9:.*]] = arith.constant 3 : index
133 // CHECK: %[[VAL_10:.*]] = arith.constant 42 : index
134 // CHECK: %[[VAL_11:.*]] = fir.shape %[[VAL_10]] : (index) -> !fir.shape<1>
135 // CHECK: %[[VAL_12:.*]] = fir.undefined index
136 // CHECK: %[[VAL_13:.*]] = fir.slice %[[VAL_8]], %[[VAL_7]]#1, %[[VAL_9]] : (index, index, index) -> !fir.slice<1>
137 // CHECK: %[[VAL_14:.*]] = fir.rebox %[[VAL_4]] {{\[}}%[[VAL_13]]] : (!fir.box<!fir.array<?xf32>>, !fir.slice<1>) -> !fir.box<!fir.array<?xf32>>
140 func.func @char_array_section(%arg0: !fir.box<!fir.array<?x!fir.char<1,?>>>, %arg1: !fir.ref<i32>) {
141 %0:2 = hlfir.declare %arg1 {uniq_name = "n"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
142 %1:2 = hlfir.declare %arg0 {uniq_name = "x"} : (!fir.box<!fir.array<?x!fir.char<1,?>>>) -> (!fir.box<!fir.array<?x!fir.char<1,?>>>, !fir.box<!fir.array<?x!fir.char<1,?>>>)
143 %2 = fir.box_elesize %1#1 : (!fir.box<!fir.array<?x!fir.char<1,?>>>) -> index
144 %c1 = arith.constant 1 : index
145 %c0 = arith.constant 0 : index
146 %3:3 = fir.box_dims %1#1, %c0 : (!fir.box<!fir.array<?x!fir.char<1,?>>>, index) -> (index, index, index)
147 %c3 = arith.constant 3 : index
148 %c42 = arith.constant 42 : index
149 %4 = fir.shape %c42 : (index) -> !fir.shape<1>
150 %5 = hlfir.designate %1#0 (%c1:%3#1:%c3) shape %4 typeparams %2 : (!fir.box<!fir.array<?x!fir.char<1,?>>>, index, index, index, !fir.shape<1>, index) -> !fir.box<!fir.array<?x!fir.char<1,?>>>
153 // CHECK-LABEL: func.func @char_array_section(
154 // CHECK-SAME: %[[VAL_0:.*]]: !fir.box<!fir.array<?x!fir.char<1,?>>>,
155 // CHECK-SAME: %[[VAL_1:.*]]: !fir.ref<i32>) {
156 // CHECK: %[[VAL_2:.*]] = fir.declare %[[VAL_1]] {uniq_name = "n"} : (!fir.ref<i32>) -> !fir.ref<i32>
157 // CHECK: %[[VAL_3:.*]] = fir.declare %[[VAL_0]] {uniq_name = "x"} : (!fir.box<!fir.array<?x!fir.char<1,?>>>) -> !fir.box<!fir.array<?x!fir.char<1,?>>>
158 // CHECK: %[[VAL_4:.*]] = fir.rebox %[[VAL_3]] : (!fir.box<!fir.array<?x!fir.char<1,?>>>) -> !fir.box<!fir.array<?x!fir.char<1,?>>>
159 // CHECK: %[[VAL_5:.*]] = fir.box_elesize %[[VAL_4]] : (!fir.box<!fir.array<?x!fir.char<1,?>>>) -> index
160 // CHECK: %[[VAL_6:.*]] = arith.constant 1 : index
161 // CHECK: %[[VAL_7:.*]] = arith.constant 0 : index
162 // CHECK: %[[VAL_8:.*]]:3 = fir.box_dims %[[VAL_4]], %[[VAL_7]] : (!fir.box<!fir.array<?x!fir.char<1,?>>>, index) -> (index, index, index)
163 // CHECK: %[[VAL_9:.*]] = arith.constant 3 : index
164 // CHECK: %[[VAL_10:.*]] = arith.constant 42 : index
165 // CHECK: %[[VAL_11:.*]] = fir.shape %[[VAL_10]] : (index) -> !fir.shape<1>
166 // CHECK: %[[VAL_12:.*]] = fir.undefined index
167 // CHECK: %[[VAL_13:.*]] = fir.slice %[[VAL_6]], %[[VAL_8]]#1, %[[VAL_9]] : (index, index, index) -> !fir.slice<1>
168 // CHECK: %[[VAL_14:.*]] = fir.rebox %[[VAL_4]] {{\[}}%[[VAL_13]]] : (!fir.box<!fir.array<?x!fir.char<1,?>>>, !fir.slice<1>) -> !fir.box<!fir.array<?x!fir.char<1,?>>>
171 func.func @char_array_section_cst_len(%arg0: !fir.box<!fir.array<?x!fir.char<1,5>>>, %arg1: !fir.ref<i32>) {
172 %0:2 = hlfir.declare %arg1 {uniq_name = "n"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
173 %c5 = arith.constant 5 : index
174 %1:2 = hlfir.declare %arg0 typeparams %c5 {uniq_name = "x"} : (!fir.box<!fir.array<?x!fir.char<1,5>>>, index) -> (!fir.box<!fir.array<?x!fir.char<1,5>>>, !fir.box<!fir.array<?x!fir.char<1,5>>>)
175 %c1 = arith.constant 1 : index
176 %c0 = arith.constant 0 : index
177 %2:3 = fir.box_dims %1#1, %c0 : (!fir.box<!fir.array<?x!fir.char<1,5>>>, index) -> (index, index, index)
178 %c3 = arith.constant 3 : index
179 %c42 = arith.constant 42 : index
180 %3 = fir.shape %c42 : (index) -> !fir.shape<1>
181 %4 = hlfir.designate %1#0 (%c1:%2#1:%c3) shape %3 typeparams %c5 : (!fir.box<!fir.array<?x!fir.char<1,5>>>, index, index, index, !fir.shape<1>, index) -> !fir.box<!fir.array<?x!fir.char<1,5>>>
184 // CHECK-LABEL: func.func @char_array_section_cst_len(
185 // CHECK-SAME: %[[VAL_0:.*]]: !fir.box<!fir.array<?x!fir.char<1,5>>>,
186 // CHECK-SAME: %[[VAL_1:.*]]: !fir.ref<i32>) {
187 // CHECK: %[[VAL_2:.*]] = fir.declare %[[VAL_1]] {uniq_name = "n"} : (!fir.ref<i32>) -> !fir.ref<i32>
188 // CHECK: %[[VAL_3:.*]] = arith.constant 5 : index
189 // CHECK: %[[VAL_4:.*]] = fir.declare %[[VAL_0]] typeparams %[[VAL_3]] {uniq_name = "x"} : (!fir.box<!fir.array<?x!fir.char<1,5>>>, index) -> !fir.box<!fir.array<?x!fir.char<1,5>>>
190 // CHECK: %[[VAL_5:.*]] = fir.rebox %[[VAL_4]] : (!fir.box<!fir.array<?x!fir.char<1,5>>>) -> !fir.box<!fir.array<?x!fir.char<1,5>>>
191 // CHECK: %[[VAL_6:.*]] = arith.constant 1 : index
192 // CHECK: %[[VAL_7:.*]] = arith.constant 0 : index
193 // CHECK: %[[VAL_8:.*]]:3 = fir.box_dims %[[VAL_5]], %[[VAL_7]] : (!fir.box<!fir.array<?x!fir.char<1,5>>>, index) -> (index, index, index)
194 // CHECK: %[[VAL_9:.*]] = arith.constant 3 : index
195 // CHECK: %[[VAL_10:.*]] = arith.constant 42 : index
196 // CHECK: %[[VAL_11:.*]] = fir.shape %[[VAL_10]] : (index) -> !fir.shape<1>
197 // CHECK: %[[VAL_12:.*]] = fir.undefined index
198 // CHECK: %[[VAL_13:.*]] = fir.slice %[[VAL_6]], %[[VAL_8]]#1, %[[VAL_9]] : (index, index, index) -> !fir.slice<1>
199 // CHECK: %[[VAL_14:.*]] = fir.rebox %[[VAL_5]] {{\[}}%[[VAL_13]]] : (!fir.box<!fir.array<?x!fir.char<1,5>>>, !fir.slice<1>) -> !fir.box<!fir.array<?x!fir.char<1,5>>>
201 func.func @test_polymorphic_array_elt(%arg0: !fir.class<!fir.array<?x!fir.type<_QMtypesTt1>>> {fir.bindc_name = "x"}) {
202 %0:2 = hlfir.declare %arg0 {uniq_name = "_QFtest1Ex"} : (!fir.class<!fir.array<?x!fir.type<_QMtypesTt1>>>) -> (!fir.class<!fir.array<?x!fir.type<_QMtypesTt1>>>, !fir.class<!fir.array<?x!fir.type<_QMtypesTt1>>>)
203 %c7 = arith.constant 7 : index
204 %1 = hlfir.designate %0#0 (%c7) : (!fir.class<!fir.array<?x!fir.type<_QMtypesTt1>>>, index) -> !fir.class<!fir.type<_QMtypesTt1>>
207 // CHECK-LABEL: func.func @test_polymorphic_array_elt(
208 // CHECK-SAME: %[[VAL_0:.*]]: !fir.class<!fir.array<?x!fir.type<_QMtypesTt1>>> {fir.bindc_name = "x"}) {
209 // CHECK: %[[VAL_1:.*]] = fir.declare %[[VAL_0]] {uniq_name = "_QFtest1Ex"} : (!fir.class<!fir.array<?x!fir.type<_QMtypesTt1>>>) -> !fir.class<!fir.array<?x!fir.type<_QMtypesTt1>>>
210 // CHECK: %[[VAL_2:.*]] = fir.rebox %[[VAL_1]] : (!fir.class<!fir.array<?x!fir.type<_QMtypesTt1>>>) -> !fir.class<!fir.array<?x!fir.type<_QMtypesTt1>>>
211 // CHECK: %[[VAL_3:.*]] = arith.constant 7 : index
212 // CHECK: %[[VAL_4:.*]] = fir.array_coor %[[VAL_2]] %[[VAL_3]] : (!fir.class<!fir.array<?x!fir.type<_QMtypesTt1>>>, index) -> !fir.ref<!fir.type<_QMtypesTt1>>
213 // CHECK: %[[VAL_5:.*]] = fir.embox %[[VAL_4]] source_box %[[VAL_2]] : (!fir.ref<!fir.type<_QMtypesTt1>>, !fir.class<!fir.array<?x!fir.type<_QMtypesTt1>>>) -> !fir.class<!fir.type<_QMtypesTt1>>