File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -106,18 +106,18 @@ contains
106
106
${t2}$, allocatable :: buf(:)
107
107
${ti}$, allocatable :: ibuf(:)
108
108
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
110
112
error stop "Too many entries for the kind of index."
111
113
end if
112
114
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."
117
117
end if
118
118
119
119
do i = 0, array_size-1
120
- index(i) = i+1
120
+ index(i) = int( i+1, kind=${ki}$)
121
121
end do
122
122
123
123
if ( optval(reverse, .false.) ) then
You can’t perform that action at this time.
0 commit comments