From 9bbfebc3a1a9b25e69644964df5406e344bbe442 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Wed, 5 Mar 2008 13:13:52 +0000 Subject: [PATCH] psblas2/base/modules: psb_realloc_mod.F90 Fixed lower/upper bound handling in realloc when no MOVE_ALLOC. --- base/modules/psb_realloc_mod.F90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/base/modules/psb_realloc_mod.F90 b/base/modules/psb_realloc_mod.F90 index 877d0c52..66785e70 100644 --- a/base/modules/psb_realloc_mod.F90 +++ b/base/modules/psb_realloc_mod.F90 @@ -1628,13 +1628,13 @@ Contains end if else if (allocated(vin)) then if (.not.allocated(vout)) then - allocate(vout(size(vin)),stat=info) + allocate(vout(vout(lbound(vin,1):ubound(vin,1)),stat=info) if (info /= 0) return else if (size(vout) /= size(vin)) then deallocate(vout,stat=info) if (info /= 0) return - allocate(vout(size(vin)),stat=info) + allocate(vout(vout(lbound(vin,1):ubound(vin,1)),stat=info) if (info /= 0) return end if end if @@ -1778,13 +1778,13 @@ Contains end if else if (allocated(vin)) then if (.not.allocated(vout)) then - allocate(vout(size(vin)),stat=info) + allocate(vout(vout(lbound(vin,1):ubound(vin,1)),stat=info) if (info /= 0) return else if (size(vout) /= size(vin)) then deallocate(vout,stat=info) if (info /= 0) return - allocate(vout(size(vin)),stat=info) + allocate(vout(vout(lbound(vin,1):ubound(vin,1)),stat=info) if (info /= 0) return end if end if