From bb675102385ff2f3753781d0f2e187c9d0e366ba Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Tue, 9 Apr 2013 09:43:14 +0000 Subject: [PATCH] psblas3: base/modules/psb_c_vect_mod.F90 base/modules/psb_d_vect_mod.F90 base/modules/psb_i_vect_mod.F90 base/modules/psb_s_vect_mod.F90 base/modules/psb_z_vect_mod.F90 INTENT of arguments of clone methods --- base/modules/psb_c_vect_mod.F90 | 5 +++-- base/modules/psb_d_vect_mod.F90 | 5 +++-- base/modules/psb_i_vect_mod.F90 | 5 +++-- base/modules/psb_s_vect_mod.F90 | 5 +++-- base/modules/psb_z_vect_mod.F90 | 5 +++-- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/base/modules/psb_c_vect_mod.F90 b/base/modules/psb_c_vect_mod.F90 index b3e6256a..0441b88b 100644 --- a/base/modules/psb_c_vect_mod.F90 +++ b/base/modules/psb_c_vect_mod.F90 @@ -98,11 +98,12 @@ contains subroutine c_vect_clone(x,y,info) implicit none class(psb_c_vect_type), intent(inout) :: x - class(psb_c_vect_type), intent(out) :: y + class(psb_c_vect_type), intent(inout) :: y integer(psb_ipk_), intent(out) :: info info = psb_success_ - if (allocated(x%v)) then + call y%free(info) + if ((info==0).and.allocated(x%v)) then call y%bld(x%get_vect(),mold=x%v) end if end subroutine c_vect_clone diff --git a/base/modules/psb_d_vect_mod.F90 b/base/modules/psb_d_vect_mod.F90 index 4392c364..47834910 100644 --- a/base/modules/psb_d_vect_mod.F90 +++ b/base/modules/psb_d_vect_mod.F90 @@ -98,11 +98,12 @@ contains subroutine d_vect_clone(x,y,info) implicit none class(psb_d_vect_type), intent(inout) :: x - class(psb_d_vect_type), intent(out) :: y + class(psb_d_vect_type), intent(inout) :: y integer(psb_ipk_), intent(out) :: info info = psb_success_ - if (allocated(x%v)) then + call y%free(info) + if ((info==0).and.allocated(x%v)) then call y%bld(x%get_vect(),mold=x%v) end if end subroutine d_vect_clone diff --git a/base/modules/psb_i_vect_mod.F90 b/base/modules/psb_i_vect_mod.F90 index d04a6ff2..d76c0758 100644 --- a/base/modules/psb_i_vect_mod.F90 +++ b/base/modules/psb_i_vect_mod.F90 @@ -98,11 +98,12 @@ contains subroutine i_vect_clone(x,y,info) implicit none class(psb_i_vect_type), intent(inout) :: x - class(psb_i_vect_type), intent(out) :: y + class(psb_i_vect_type), intent(inout) :: y integer(psb_ipk_), intent(out) :: info info = psb_success_ - if (allocated(x%v)) then + call y%free(info) + if ((info==0).and.allocated(x%v)) then call y%bld(x%get_vect(),mold=x%v) end if end subroutine i_vect_clone diff --git a/base/modules/psb_s_vect_mod.F90 b/base/modules/psb_s_vect_mod.F90 index b935662c..5e4e96e8 100644 --- a/base/modules/psb_s_vect_mod.F90 +++ b/base/modules/psb_s_vect_mod.F90 @@ -98,11 +98,12 @@ contains subroutine s_vect_clone(x,y,info) implicit none class(psb_s_vect_type), intent(inout) :: x - class(psb_s_vect_type), intent(out) :: y + class(psb_s_vect_type), intent(inout) :: y integer(psb_ipk_), intent(out) :: info info = psb_success_ - if (allocated(x%v)) then + call y%free(info) + if ((info==0).and.allocated(x%v)) then call y%bld(x%get_vect(),mold=x%v) end if end subroutine s_vect_clone diff --git a/base/modules/psb_z_vect_mod.F90 b/base/modules/psb_z_vect_mod.F90 index c754824c..ee55b4e8 100644 --- a/base/modules/psb_z_vect_mod.F90 +++ b/base/modules/psb_z_vect_mod.F90 @@ -98,11 +98,12 @@ contains subroutine z_vect_clone(x,y,info) implicit none class(psb_z_vect_type), intent(inout) :: x - class(psb_z_vect_type), intent(out) :: y + class(psb_z_vect_type), intent(inout) :: y integer(psb_ipk_), intent(out) :: info info = psb_success_ - if (allocated(x%v)) then + call y%free(info) + if ((info==0).and.allocated(x%v)) then call y%bld(x%get_vect(),mold=x%v) end if end subroutine z_vect_clone