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:
Salvatore Filippone
2013-04-05 14:32:22 +00:00
parent 1f5b66fc82
commit 2dbd56b775
9 changed files with 97 additions and 50 deletions
+13 -2
View File
@@ -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_