Skip to content

Commit 0d9d191

Browse files
committed
Let's use a constant literal
1 parent fd1a6e6 commit 0d9d191

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/io/test_np.f90

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ subroutine npz_save_two_arrays(error)
11501150
type(t_array_wrapper), allocatable :: arrays(:), arrays_reloaded(:)
11511151
integer :: stat, j
11521152
real(dp), allocatable :: input_array_1(:,:)
1153-
complex(dp), allocatable :: input_array_2(:)
1153+
complex(dp), parameter, dimension(3) :: input_array_2 = [cmplx(1, 2, kind=8), cmplx(3, 4, kind=8), cmplx(5, 6, kind=8)]
11541154
character(*), parameter :: array_name_1 = "array_1"
11551155
character(*), parameter :: array_name_2 = "array_2"
11561156
character(*), parameter :: output_file = "two_arrays.npz"
@@ -1162,7 +1162,6 @@ subroutine npz_save_two_arrays(error)
11621162
call check(error, stat, "Error adding array 1 to the list of arrays.")
11631163
if (allocated(error)) return
11641164

1165-
input_array_2 = [cmplx(1, 2, kind=8), cmplx(3, 4, kind=8), cmplx(5, 6, kind=8)]
11661165
call add_array(arrays, input_array_2, stat, name=array_name_2)
11671166
call check(error, stat, "Error adding array 2 to the list of arrays.")
11681167
if (allocated(error)) return

0 commit comments

Comments
 (0)