mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-19 12:22:10 +00:00
psblas2/base/modules:
psb_realloc_mod.F90 Fixed lower/upper bound handling in realloc when no MOVE_ALLOC.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user