Skip to content

Commit 6621791

Browse files
committed
Print in add_array
1 parent dbad853 commit 6621791

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

src/stdlib_io_np_save.fypp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,15 @@ contains
172172

173173
allocate(t_arr%values, source=array)
174174

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+
175184
if (.not. allocated(arrays)) then
176185
allocate(arrays(1))
177186
allocate(arrays(1)%array, source=t_arr)
@@ -187,7 +196,29 @@ contains
187196
end do
188197

189198
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+
190209
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
191222
end
192223
#:endfor
193224
#:endfor

0 commit comments

Comments
 (0)