From e9af5d4d691e0159c6a791378771f9e3ef710d98 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Mon, 19 Feb 2007 14:54:56 +0000 Subject: [PATCH] Fixed call to SIZE() to use a copy of an optional argument. --- base/modules/psb_realloc_mod.F90 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/base/modules/psb_realloc_mod.F90 b/base/modules/psb_realloc_mod.F90 index fec8559d..f65b9ad1 100644 --- a/base/modules/psb_realloc_mod.F90 +++ b/base/modules/psb_realloc_mod.F90 @@ -373,12 +373,14 @@ Contains integer :: psb_isize2d integer, allocatable, intent(in) :: vin(:,:) integer, optional :: dim + integer :: dim_ if (.not.allocated(vin)) then psb_isize2d = 0 else if (present(dim)) then - psb_isize2d = size(vin,dim=dim) + dim_= dim + psb_isize2d = size(vin,dim=dim_) else psb_isize2d = size(vin) end if @@ -399,12 +401,15 @@ Contains integer :: psb_dsize2d real(kind(1.d0)), allocatable, intent(in) :: vin(:,:) integer, optional :: dim + integer :: dim_ + if (.not.allocated(vin)) then psb_dsize2d = 0 else if (present(dim)) then - psb_dsize2d = size(vin,dim=dim) + dim_= dim + psb_dsize2d = size(vin,dim=dim_) else psb_dsize2d = size(vin) end if @@ -427,12 +432,14 @@ Contains integer :: psb_zsize2d complex(kind(1.d0)), allocatable, intent(in) :: vin(:,:) integer, optional :: dim + integer :: dim_ if (.not.allocated(vin)) then psb_zsize2d = 0 else if (present(dim)) then - psb_zsize2d = size(vin,dim=dim) + dim_= dim + psb_zsize2d = size(vin,dim=dim_) else psb_zsize2d = size(vin) end if