diff --git a/src/stdlib_sorting.fypp b/src/stdlib_sorting.fypp index 0dd385459..a078bfc2e 100644 --- a/src/stdlib_sorting.fypp +++ b/src/stdlib_sorting.fypp @@ -661,23 +661,23 @@ contains ${ti}$, intent(out), optional :: iwork(0:) logical, intent(in), optional :: reverse - integer(int_index) :: array_size, i + integer(int_index) :: array_size, i - array_size = size(array, kind=int_index) + array_size = size(array, kind=int_index) - if ( array_size > huge(index)) then - error stop "Too many entries for the kind of index." - end if + if ( array_size > huge(index)) then + error stop "Too many entries for the kind of index." + end if - if ( array_size > size(index, kind=int_index) ) then - error stop "Too many entries for the size of index." - end if + if ( array_size > size(index, kind=int_index) ) then + error stop "Too many entries for the size of index." + end if - do i = 0, array_size-1 - index(i) = int(i+1, kind=${ki}$) - end do + do i = 0, array_size-1 + index(i) = int(i+1, kind=${ki}$) + end do - call sort_adj(array, index, work, iwork, reverse) + call sort_adj(array, index, work, iwork, reverse) end subroutine ${name1}$_sort_index_${namei}$