@@ -172,6 +172,15 @@ contains
172
172
173
173
allocate(t_arr%values, source=array)
174
174
175
+ print *, 'after allocating values'
176
+ select type (typed_array => t_arr%values)
177
+ class is (t_array_rdp_2)
178
+ print *, typed_array%values
179
+ class is (t_array_cdp_1)
180
+ print *, typed_array%values
181
+ class default
182
+ end select
183
+
175
184
if (.not. allocated(arrays)) then
176
185
allocate(arrays(1))
177
186
allocate(arrays(1)%array, source=t_arr)
@@ -187,7 +196,29 @@ contains
187
196
end do
188
197
189
198
allocate(wrapper%array, source=t_arr)
199
+
200
+ print *, 'after allocating wrapper'
201
+ select type (typed_array => t_arr%values)
202
+ class is (t_array_rdp_2)
203
+ print *, typed_array%values
204
+ class is (t_array_cdp_1)
205
+ print *, typed_array%values
206
+ class default
207
+ end select
208
+
190
209
arrays = [arrays, wrapper]
210
+
211
+ print *, 'after allocating arrays'
212
+ do i = 1, size(arrays)
213
+ print *, arrays(i)%array%name
214
+ select type (typed_array => arrays(i)%array)
215
+ class is (t_array_rdp_2)
216
+ print *, typed_array%values
217
+ class is (t_array_cdp_1)
218
+ print *, typed_array%values
219
+ class default
220
+ end select
221
+ end do
191
222
end
192
223
#:endfor
193
224
#:endfor
0 commit comments