summaryrefslogtreecommitdiff
path: root/lib/sort.f90
diff options
context:
space:
mode:
authorhibby <d@vehibberd.com>2018-02-16 15:17:14 +0000
committerhibby <d@vehibberd.com>2018-02-16 15:17:14 +0000
commit37f727ac0746fd85504aa46c1f023c09b3eff33a (patch)
treec8a7ce04545040a8f161ba279528730bd9a3e6ab /lib/sort.f90
parentd63dd8d081a6fcd0715cd13f26df59fb831769d2 (diff)
New upstream version 1.8.0+repackupstream/1.8.0+repack
Diffstat (limited to 'lib/sort.f90')
-rw-r--r--lib/sort.f909
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sort.f90 b/lib/sort.f90
index 993dafd7..0a90a6b3 100644
--- a/lib/sort.f90
+++ b/lib/sort.f90
@@ -9,6 +9,7 @@ subroutine sort(n,arr)
jstack=0
l=1
ir=n
+ n0=n
1 if(ir-l.lt.m) then
do j=l+1,ir
@@ -55,6 +56,14 @@ subroutine sort(n,arr)
j=ir
a=arr(l)
3 i=i+1
+ if(i.gt.n0) then
+ do jj=1,n0
+ write(99,3001) jj,arr(jj),i,n,ir
+3001 format(i10,e12.3,3i10)
+ enddo
+ close(99)
+ stop 'Bounds error in sort.f90'
+ endif
if(arr(i).lt.a) goto 3
4 j=j-1