mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-20 21:02:26 +00:00
psblas3:
base/modules/psb_c_base_mat_mod.f90 base/modules/psb_d_base_mat_mod.f90 base/modules/psb_desc_mod.f90 base/modules/psb_s_base_mat_mod.f90 base/modules/psb_z_base_mat_mod.f90 base/serial/impl/psb_c_base_mat_impl.F90 base/serial/impl/psb_d_base_mat_impl.F90 base/serial/impl/psb_s_base_mat_impl.F90 base/serial/impl/psb_z_base_mat_impl.F90 Fix clone to avoid INTENT(OUT),ALLOCATABLE and use intent(inout)
This commit is contained in:
@@ -555,10 +555,21 @@ subroutine psb_d_base_clone(a,b,info)
|
||||
use psb_error_mod
|
||||
implicit none
|
||||
|
||||
class(psb_d_base_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_base_sparse_mat), allocatable, intent(out) :: b
|
||||
class(psb_d_base_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_base_sparse_mat), allocatable, intent(inout) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
if (allocated(b)) then
|
||||
call b%free()
|
||||
deallocate(b, stat=info)
|
||||
end if
|
||||
if (info /= 0) then
|
||||
info = psb_err_alloc_dealloc_
|
||||
return
|
||||
end if
|
||||
|
||||
! Do not use SOURCE allocation: this makes sure that
|
||||
! memory allocated elsewhere is treated properly.
|
||||
#if defined(HAVE_MOLD)
|
||||
allocate(b,mold=a,stat=info)
|
||||
if (info /= psb_success_) info = psb_err_alloc_dealloc_
|
||||
|
||||
Reference in New Issue
Block a user