Skip to content

Commit 61796f7

Browse files
committed
Invert addition and allocation
1 parent c3b830e commit 61796f7

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

src/stdlib_io_np_save.fypp

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -185,33 +185,8 @@ contains
185185
end if
186186
end do
187187

188-
allocate(wrapper%array, source=t_arr)
189-
190-
print *, 'before adding to arrays'
191-
do i = 1, size(arrays)
192-
print *, arrays(i)%array%name
193-
select type (typed_array => arrays(i)%array)
194-
class is (t_array_rdp_2)
195-
print *, typed_array%values
196-
class is (t_array_cdp_1)
197-
print *, typed_array%values
198-
class default
199-
end select
200-
end do
201-
202188
arrays = [arrays, wrapper]
203-
204-
print *, 'after adding to arrays'
205-
do i = 1, size(arrays)
206-
print *, arrays(i)%array%name
207-
select type (typed_array => arrays(i)%array)
208-
class is (t_array_rdp_2)
209-
print *, typed_array%values
210-
class is (t_array_cdp_1)
211-
print *, typed_array%values
212-
class default
213-
end select
214-
end do
189+
allocate(wrapper%array, source=t_arr)
215190
end
216191
#:endfor
217192
#:endfor

0 commit comments

Comments
 (0)