new file mode 100644
@@ -0,0 +1,207 @@
+! { dg-do run }
+!
+! PR fortran/112371
+! The library used to not set the bounds and content of the resulting array
+! of a reduction function if the input array had zero extent along the
+! reduction dimension.
+
+program p
+ implicit none
+ call check_iall
+ call check_iany
+ call check_iparity
+ call check_minloc_int
+ call check_minloc_char
+ call check_maxloc_real
+ call check_maxloc_char
+ call check_minval_int
+ call check_minval_char
+ call check_maxval_real
+ call check_maxval_char
+ call check_sum
+ call check_product
+contains
+ subroutine check_iall
+ integer :: a(3,0,2)
+ logical(kind=1) :: m(3,0,2)
+ integer :: i
+ integer, allocatable :: r(:,:)
+ a = reshape((/ integer:: /), shape(a))
+ m = reshape((/ logical(kind=1):: /), shape(m))
+ i = 2
+ r = iall(a, dim=i, mask=m)
+ if (any(lbound(r) /= 1)) stop 11
+ if (any(ubound(r) /= (/ 3, 2 /))) stop 12
+ if (any(shape(r) /= (/ 3, 2 /))) stop 13
+ if (any(r /= int(z'FFFFFFFF'))) stop 14
+ end subroutine
+ subroutine check_iany
+ integer(kind=8) :: a(2,3,0)
+ logical(kind=1) :: m(2,3,0)
+ integer :: i
+ integer(kind=8), allocatable :: r(:,:)
+ a = reshape((/ integer(kind=8):: /), shape(a))
+ m = reshape((/ logical(kind=1):: /), shape(m))
+ i = 3
+ r = iany(a, dim=i, mask=m)
+ if (any(lbound(r) /= 1)) stop 21
+ if (any(ubound(r) /= (/ 2, 3 /))) stop 22
+ if (any(shape(r) /= (/ 2, 3 /))) stop 23
+ if (any(r /= 0)) stop 24
+ end subroutine
+ subroutine check_iparity
+ integer(kind=2) :: a(0,2,3)
+ logical(kind=1) :: m(0,2,3)
+ integer :: i
+ integer, allocatable :: r(:,:)
+ a = reshape((/ integer(kind=2):: /), shape(a))
+ m = reshape((/ logical(kind=1):: /), shape(m))
+ i = 1
+ r = iparity(a, dim=i, mask=m)
+ if (any(lbound(r) /= 1)) stop 31
+ if (any(ubound(r) /= (/ 2, 3 /))) stop 32
+ if (any(shape(r) /= (/ 2, 3 /))) stop 33
+ if (any(r /= 0)) stop 34
+ end subroutine
+ subroutine check_minloc_int
+ integer :: a(3,0,2)
+ logical(kind=1) :: m(3,0,2)
+ integer :: i, j
+ integer, allocatable :: r(:,:)
+ a = reshape((/ integer:: /), shape(a))
+ m = reshape((/ logical(kind=1):: /), shape(m))
+ i = 2
+ r = minloc(a, dim=i, mask=m)
+ if (any(lbound(r) /= 1)) stop 41
+ if (any(ubound(r) /= (/ 3, 2 /))) stop 42
+ if (any(shape(r) /= (/ 3, 2 /))) stop 43
+ if (any(r /= 0)) stop 44
+ end subroutine
+ subroutine check_minloc_char
+ character :: a(2,3,0)
+ logical(kind=1) :: m(2,3,0)
+ integer :: i
+ integer, allocatable :: r(:,:)
+ a = reshape((/ character:: /), shape(a))
+ m = reshape((/ logical(kind=1):: /), shape(m))
+ i = 3
+ r = minloc(a, dim=i, mask=m)
+ if (any(lbound(r) /= 1)) stop 51
+ if (any(ubound(r) /= (/ 2, 3 /))) stop 52
+ if (any(shape(r) /= (/ 2, 3 /))) stop 53
+ if (any(r /= 0)) stop 54
+ end subroutine
+ subroutine check_maxloc_real
+ real :: a(0,2,3)
+ logical(kind=1) :: m(0,2,3)
+ integer :: i
+ integer, allocatable :: r(:,:)
+ a = reshape((/ real:: /), shape(a))
+ m = reshape((/ logical(kind=1):: /), shape(m))
+ i = 1
+ r = maxloc(a, dim=i, mask=m)
+ if (any(lbound(r) /= 1)) stop 61
+ if (any(ubound(r) /= (/ 2, 3 /))) stop 62
+ if (any(shape(r) /= (/ 2, 3 /))) stop 63
+ if (any(r /= 0)) stop 64
+ end subroutine
+ subroutine check_maxloc_char
+ character(len=2) :: a(3,0,2)
+ logical(kind=1) :: m(3,0,2)
+ integer :: i
+ integer, allocatable :: r(:,:)
+ a = reshape((/ character(len=2):: /), shape(a))
+ m = reshape((/ logical(kind=1):: /), shape(m))
+ i = 2
+ r = maxloc(a, dim=i, mask=m)
+ if (any(lbound(r) /= 1)) stop 71
+ if (any(ubound(r) /= (/ 3, 2 /))) stop 72
+ if (any(shape(r) /= (/ 3, 2 /))) stop 73
+ if (any(r /= 0)) stop 74
+ end subroutine
+ subroutine check_minval_int
+ integer(kind=2) :: a(3,2,0)
+ logical(kind=1) :: m(3,2,0)
+ integer :: i, j
+ integer, allocatable :: r(:,:)
+ a = reshape((/ integer(kind=2):: /), shape(a))
+ m = reshape((/ logical(kind=1):: /), shape(m))
+ i = 3
+ r = minval(a, dim=i, mask=m)
+ if (any(lbound(r) /= 1)) stop 81
+ if (any(ubound(r) /= (/ 3, 2 /))) stop 82
+ if (any(shape(r) /= (/ 3, 2 /))) stop 83
+ if (any(r /= huge(1_2))) stop 84
+ end subroutine
+ subroutine check_minval_char
+ character(kind=4) :: a(0,3,2)
+ logical(kind=1) :: m(0,3,2)
+ integer :: i
+ character(kind=4), allocatable :: r(:,:)
+ a = reshape((/ character(kind=4):: /), shape(a))
+ m = reshape((/ logical(kind=1):: /), shape(m))
+ i = 1
+ r = minval(a, dim=i, mask=m)
+ if (any(lbound(r) /= 1)) stop 91
+ if (any(ubound(r) /= (/ 3, 2 /))) stop 92
+ if (any(shape(r) /= (/ 3, 2 /))) stop 93
+ if (any(r /= char(int(z'FFFFFFFF', kind=8), kind=4))) stop 94
+ end subroutine
+ subroutine check_maxval_real
+ real(kind=8) :: a(0,2,3)
+ logical(kind=1) :: m(0,2,3)
+ integer :: i
+ real(kind=8), allocatable :: r(:,:)
+ a = reshape((/ real(kind=8):: /), shape(a))
+ m = reshape((/ logical(kind=1):: /), shape(m))
+ i = 1
+ r = maxval(a, dim=i, mask=m)
+ if (any(lbound(r) /= 1)) stop 101
+ if (any(ubound(r) /= (/ 2, 3 /))) stop 102
+ if (any(shape(r) /= (/ 2, 3 /))) stop 103
+ if (any(r /= -huge(1._8))) stop 104
+ end subroutine
+ subroutine check_maxval_char
+ character(kind=4,len=2) :: a(3,0,2), e
+ logical(kind=1) :: m(3,0,2)
+ integer :: i
+ character(len=2,kind=4), allocatable :: r(:,:)
+ a = reshape((/ character(kind=4,len=2):: /), shape(a))
+ m = reshape((/ logical(kind=1):: /), shape(m))
+ i = 2
+ r = maxval(a, dim=i, mask=m)
+ if (any(lbound(r) /= 1)) stop 111
+ if (any(ubound(r) /= (/ 3, 2 /))) stop 112
+ if (any(shape(r) /= (/ 3, 2 /))) stop 113
+ e = repeat(char(0, kind=4), len(a))
+ if (any(r /= e)) stop 114
+ end subroutine
+ subroutine check_sum
+ integer(kind=1) :: a(2,3,0)
+ logical(kind=1) :: m(2,3,0)
+ integer :: i
+ integer, allocatable :: r(:,:)
+ a = reshape((/ integer:: /), shape(a))
+ m = reshape((/ logical(kind=1):: /), shape(m))
+ i = 3
+ r = sum(a, dim=i, mask=m)
+ if (any(lbound(r) /= 1)) stop 121
+ if (any(ubound(r) /= (/ 2, 3 /))) stop 122
+ if (any(shape(r) /= (/ 2, 3 /))) stop 123
+ if (any(r /= 0)) stop 124
+ end subroutine
+ subroutine check_product
+ real(kind=8) :: a(0,2,3)
+ logical(kind=1) :: m(0,2,3)
+ integer :: i
+ integer, allocatable :: r(:,:)
+ a = reshape((/ real(kind=8):: /), shape(a))
+ m = reshape((/ logical(kind=1):: /), shape(m))
+ i = 1
+ r = product(a, dim=i, mask=m)
+ if (any(lbound(r) /= 1)) stop 131
+ if (any(ubound(r) /= (/ 2, 3 /))) stop 132
+ if (any(shape(r) /= (/ 2, 3 /))) stop 133
+ if (any(r /= 1.0_8)) stop 134
+ end subroutine
+end program
@@ -242,8 +242,8 @@ miall_i1 (gfc_array_i1 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ miall_i16 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ miall_i2 (gfc_array_i2 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ miall_i4 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ miall_i8 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ miany_i1 (gfc_array_i1 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ miany_i16 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ miany_i2 (gfc_array_i2 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ miany_i4 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ miany_i8 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ miparity_i1 (gfc_array_i1 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ miparity_i16 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ miparity_i2 (gfc_array_i2 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ miparity_i4 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ miparity_i8 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_16_i1 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_16_i16 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_16_i2 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_16_i4 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_16_i8 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_16_r10 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_16_r16 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_16_r17 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_16_r4 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_16_r8 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -263,8 +263,8 @@ mmaxloc1_16_s1 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -263,8 +263,8 @@ mmaxloc1_16_s4 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_4_i1 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_4_i16 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_4_i2 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_4_i4 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_4_i8 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_4_r10 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_4_r16 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_4_r17 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_4_r4 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_4_r8 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -263,8 +263,8 @@ mmaxloc1_4_s1 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -263,8 +263,8 @@ mmaxloc1_4_s4 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_8_i1 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_8_i16 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_8_i2 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_8_i4 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_8_i8 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_8_r10 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_8_r16 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_8_r17 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -270,8 +270,8 @@ mmaxloc1_8_r8 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -263,8 +263,8 @@ mmaxloc1_8_s1 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -263,8 +263,8 @@ mmaxloc1_8_s4 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -258,8 +258,8 @@ mmaxval1_s1 (gfc_array_s1 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -258,8 +258,8 @@ mmaxval1_s4 (gfc_array_s4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mmaxval_i1 (gfc_array_i1 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mmaxval_i16 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mmaxval_i2 (gfc_array_i2 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mmaxval_i4 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mmaxval_i8 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mmaxval_r10 (gfc_array_r10 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mmaxval_r16 (gfc_array_r16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mmaxval_r17 (gfc_array_r17 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mmaxval_r4 (gfc_array_r4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mmaxval_r8 (gfc_array_r8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_16_i1 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_16_i16 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_16_i2 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_16_i4 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_16_i8 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_16_r10 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_16_r16 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_16_r17 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_16_r4 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_16_r8 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -263,8 +263,8 @@ mminloc1_16_s1 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -263,8 +263,8 @@ mminloc1_16_s4 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_4_i1 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_4_i16 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_4_i2 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_4_i4 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_4_i8 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_4_r10 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_4_r16 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_4_r17 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_4_r4 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_4_r8 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -263,8 +263,8 @@ mminloc1_4_s1 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -263,8 +263,8 @@ mminloc1_4_s4 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_8_i1 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_8_i16 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_8_i2 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_8_i4 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_8_i8 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_8_r10 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_8_r16 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_8_r17 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_8_r4 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -280,8 +280,8 @@ mminloc1_8_r8 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -263,8 +263,8 @@ mminloc1_8_s1 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -263,8 +263,8 @@ mminloc1_8_s4 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -258,8 +258,8 @@ mminval1_s1 (gfc_array_s1 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -258,8 +258,8 @@ mminval1_s4 (gfc_array_s4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mminval_i1 (gfc_array_i1 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mminval_i16 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mminval_i2 (gfc_array_i2 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mminval_i4 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mminval_i8 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mminval_r10 (gfc_array_r10 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mminval_r16 (gfc_array_r16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mminval_r17 (gfc_array_r17 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mminval_r4 (gfc_array_r4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -256,8 +256,8 @@ mminval_r8 (gfc_array_r8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ mproduct_c10 (gfc_array_c10 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ mproduct_c16 (gfc_array_c16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ mproduct_c17 (gfc_array_c17 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ mproduct_c4 (gfc_array_c4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ mproduct_c8 (gfc_array_c8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ mproduct_i1 (gfc_array_i1 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ mproduct_i16 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ mproduct_i2 (gfc_array_i2 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ mproduct_i4 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ mproduct_i8 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ mproduct_r10 (gfc_array_r10 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ mproduct_r16 (gfc_array_r16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ mproduct_r17 (gfc_array_r17 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ mproduct_r4 (gfc_array_r4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ mproduct_r8 (gfc_array_r8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ msum_c10 (gfc_array_c10 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ msum_c16 (gfc_array_c16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ msum_c17 (gfc_array_c17 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ msum_c4 (gfc_array_c4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ msum_c8 (gfc_array_c8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ msum_i1 (gfc_array_i1 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ msum_i16 (gfc_array_i16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ msum_i2 (gfc_array_i2 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ msum_i4 (gfc_array_i4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ msum_i8 (gfc_array_i8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ msum_r10 (gfc_array_r10 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ msum_r16 (gfc_array_r16 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ msum_r17 (gfc_array_r17 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ msum_r4 (gfc_array_r4 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -242,8 +242,8 @@ msum_r8 (gfc_array_r8 * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -244,8 +244,8 @@ m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -244,8 +244,8 @@ void
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;
@@ -232,8 +232,8 @@ m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray,
}
len = GFC_DESCRIPTOR_EXTENT(array,dim);
- if (len <= 0)
- return;
+ if (len < 0)
+ len = 0;
mbase = mask->base_addr;