File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -106,18 +106,18 @@ contains
106106 ${t2}$, allocatable :: buf(:)
107107 ${ti}$, allocatable :: ibuf(:)
108108
109- if ( size(array, kind=int_index) > huge(1_${ki}$) then
109+ array_size = size(array, kind=int_index)
110+
111+ if ( array_size > huge(index)) then
110112 error stop "Too many entries for the kind of index."
111113 end if
112114
113- array_size = size(array, kind=int_index)
114-
115- if ( size(index, kind=int_index) < array_size ) then
116- error stop "index array is too small."
115+ if ( array_size > size(index, kind=int_index) ) then
116+ error stop "Too many entries for the size of index."
117117 end if
118118
119119 do i = 0, array_size-1
120- index(i) = i+1
120+ index(i) = int( i+1, kind=${ki}$)
121121 end do
122122
123123 if ( optval(reverse, .false.) ) then
You can’t perform that action at this time.
0 commit comments