re PR libfortran/19106 ([4.0 only] segfault in executable for print *,sum(a,dim=2,mask=a>0))

2005-04-13  Thomas Koenig  <Thomas.Koenig@online.de>

        PR libfortran/19106
        * m4/iforeach.c (name`'rtype_qual`_'atype_code):  Add TODO
        that setting correct strides is a front end job.
        (`m'name`'rtype_qual`_'atype_code):  Likewise.  If mask has
        a lowest stride of 0, adjust to 1.
        * m4/ifunction.c (name`'rtype_qual`_'atype_code):  Add TODO
        that setting correct strides is a front end job.
        (`m'name`'rtype_qual`_'atype_code):  Likewise.  If mask has
        a lowest stride of 0, adjust to 1.
        * maxloc0_4_i4.c: Regenerated
        * maxloc0_4_i8.c: Regenerated
        * maxloc0_4_r4.c: Regenerated
        * maxloc0_4_r8.c: Regenerated
        * maxloc0_8_i4.c: Regenerated
        * maxloc0_8_i8.c: Regenerated
        * maxloc0_8_r4.c: Regenerated
        * maxloc0_8_r8.c: Regenerated
        * maxloc1_4_i4.c: Regenerated
        * maxloc1_4_i8.c: Regenerated
        * maxloc1_4_r4.c: Regenerated
        * maxloc1_4_r8.c: Regenerated
        * maxloc1_8_i4.c: Regenerated
        * maxloc1_8_i8.c: Regenerated
        * maxloc1_8_r4.c: Regenerated
        * maxloc1_8_r8.c: Regenerated
        * maxval_i4.c: Regenerated
        * maxval_i8.c: Regenerated
        * maxval_r4.c: Regenerated
        * maxval_r8.c: Regenerated
        * minloc0_4_i4.c: Regenerated
        * minloc0_4_i8.c: Regenerated
        * minloc0_4_r4.c: Regenerated
        * minloc0_4_r8.c: Regenerated
        * minloc0_8_i4.c: Regenerated
        * minloc0_8_i8.c: Regenerated
        * minloc0_8_r4.c: Regenerated
        * minloc0_8_r8.c: Regenerated
        * minloc1_4_i4.c: Regenerated
        * minloc1_4_i8.c: Regenerated
        * minloc1_4_r4.c: Regenerated
        * minloc1_4_r8.c: Regenerated
        * minloc1_8_i4.c: Regenerated
        * minloc1_8_i8.c: Regenerated
        * minloc1_8_r4.c: Regenerated
        * minloc1_8_r8.c: Regenerated
        * minval_i4.c: Regenerated
        * minval_i8.c: Regenerated
        * minval_r4.c: Regenerated
        * minval_r8.c: Regenerated
        * product_c4.c: Regenerated
        * product_c8.c: Regenerated
        * product_i4.c: Regenerated
        * product_i8.c: Regenerated
        * product_r4.c: Regenerated
        * product_r8.c: Regenerated
        * sum_c4.c: Regenerated
        * sum_c8.c: Regenerated
        * sum_i4.c: Regenerated
        * sum_i8.c: Regenerated
        * sum_r4.c: Regenerated
        * sum_r8.c: Regenerated

2005-04-13  Thomas Koenig  <Thomas.Koenig@online.de>

        PR libfortran/19016
        * gfortran.fortran-torture/execute/intrinsic_mmloc.f90:
        Add tests with mask generated by expression.
        * gfortran.fortran-torture/execute/intrinsic_mmval.f90:  Likewise.
        * gfortran.fortran-torture/execute/intrinsic_product.f90:  Likewise.
        * gfortran.fortran-torture/execute/intrinsic_sum.f90:  Likewise.

From-SVN: r98052
This commit is contained in:
Thomas Koenig 2005-04-12 22:57:10 +00:00 committed by Thomas Koenig
parent b3b51ded80
commit c6abe94dc1
60 changed files with 288 additions and 6 deletions

View File

@ -1,3 +1,12 @@
2005-04-13 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/19016
* gfortran.fortran-torture/execute/intrinsic_mmloc.f90:
Add tests with mask generated by expression.
* gfortran.fortran-torture/execute/intrinsic_mmval.f90: Likewise.
* gfortran.fortran-torture/execute/intrinsic_product.f90: Likewise.
* gfortran.fortran-torture/execute/intrinsic_sum.f90: Likewise.
2005-04-12 Ulrich Weigand <uweigand@de.ibm.com>
PR middle-end/20917

View File

@ -3,11 +3,12 @@ program testmmloc
implicit none
integer, dimension (3, 3) :: a
integer, dimension (3) :: b
logical, dimension (3, 3) :: m
logical, dimension (3, 3) :: m, tr
integer i
character(len=10) line
a = reshape ((/1, 2, 3, 5, 4, 6, 9, 8, 7/), (/3, 3/));
tr = .true.
b = minloc (a, 1)
if (b(1) .ne. 1) call abort
@ -27,6 +28,10 @@ program testmmloc
if (b(1) .ne. 2) call abort
if (b(2) .ne. 2) call abort
if (b(3) .ne. 3) call abort
b = minloc (a, 1, m .and. tr)
if (b(1) .ne. 2) call abort
if (b(2) .ne. 2) call abort
if (b(3) .ne. 3) call abort
b = -1
write (line, 9000) minloc(a, 1, m)
read (line, 9000) b
@ -47,6 +52,9 @@ program testmmloc
b(1:2) = minloc(a, mask=m)
if (b(1) .ne. 2) call abort
if (b(2) .ne. 1) call abort
b(1:2) = minloc(a, mask=m .and. tr)
if (b(1) .ne. 2) call abort
if (b(2) .ne. 1) call abort
b = -1
write (line, 9000) minloc(a, mask=m)
read (line, 9000) b
@ -72,6 +80,10 @@ program testmmloc
if (b(1) .ne. 3) call abort
if (b(2) .ne. 3) call abort
if (b(3) .ne. 2) call abort
b = maxloc (a, 1, m .and. tr)
if (b(1) .ne. 3) call abort
if (b(2) .ne. 3) call abort
if (b(3) .ne. 2) call abort
b = -1
write (line, 9000) maxloc(a, 1, m)
read (line, 9000) b
@ -91,6 +103,9 @@ program testmmloc
b(1:2) = maxloc(a, mask=m)
if (b(1) .ne. 2) call abort
if (b(2) .ne. 3) call abort
b(1:2) = maxloc(a, mask=m .and. tr)
if (b(1) .ne. 2) call abort
if (b(2) .ne. 3) call abort
b = -1
write (line, 9000) maxloc(a, mask=m)
read (line, 9000) b

View File

@ -3,12 +3,14 @@ program testmmval
implicit none
integer, dimension (3, 3) :: a
integer, dimension (3) :: b
logical, dimension (3, 3) :: m
logical, dimension (3, 3) :: m, tr
integer i
character (len=9) line
a = reshape ((/1, 2, 3, 5, 4, 6, 9, 8, 7/), (/3, 3/));
tr = .true.
b = minval (a, 1)
if (any(b .ne. (/1, 4, 7/))) call abort
write (line, 9000) minval (a, 1)
@ -19,6 +21,8 @@ program testmmval
m(1, 2) = .false.
b = minval (a, 1, m)
if (any(b .ne. (/2, 4, 7/))) call abort
b = minval (a, 1, m .and. tr)
if (any(b .ne. (/2, 4, 7/))) call abort
write (line, 9000) minval(a, 1, m)
if (line .ne. ' 2 4 7') call abort
@ -32,6 +36,8 @@ program testmmval
m(1, 3) = .false.
b = maxval (a, 1, m)
if (any(b .ne. (/3, 6, 8/))) call abort
b = maxval (a, 1, m .and. tr)
if (any(b .ne. (/3, 6, 8/))) call abort
write (line, 9000) maxval(a, 1, m)
if (line .ne. ' 3 6 8') call abort

View File

@ -3,13 +3,15 @@ program testproduct
implicit none
integer, dimension (3, 3) :: a
integer, dimension (3) :: b
logical, dimension (3, 3) :: m
logical, dimension (3, 3) :: m, tr
character(len=12) line
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/));
b = product (a, 1)
tr = .true.
if (any(b .ne. (/6, 120, 504/))) call abort
write (line, 9000) product(a,1)
@ -23,8 +25,11 @@ program testproduct
m = .true.
m(1, 1) = .false.
m(2, 1) = .false.
b = product (a, 2, m)
b = product (a, 2, m)
if (any(b .ne. (/28, 40, 162/))) call abort
b = product (a, 2, m .and. tr)
if (any(b .ne. (/28, 40, 162/))) call abort
write (line, 9000) product(a, 2, m)
@ -32,6 +37,8 @@ program testproduct
if (product (a, mask=m) .ne. 181440) call abort
if (product (a, mask=m .and. tr) .ne. 181440) call abort
write (line, 9010) product(a, mask=m)
if (line .ne. '181440') call abort

View File

@ -3,12 +3,14 @@ program testforall
implicit none
integer, dimension (3, 3) :: a
integer, dimension (3) :: b
logical, dimension (3, 3) :: m
logical, dimension (3, 3) :: m, tr
integer i
character(len=9) line
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/));
tr = .true.
if (sum(a) .ne. 45) call abort
write (line, 9000) sum(a)
if (line .ne. ' 45 ') call abort
@ -24,6 +26,7 @@ program testforall
m(2, 1) = .false.
if (sum (a, mask=m) .ne. 42) call abort
if (sum (a, mask=m .and. tr) .ne. 42) call abort
write(line, 9000) sum (a, mask=m)
if (line .ne. ' 42 ') call abort
@ -32,6 +35,11 @@ program testforall
if (b(1) .ne. 11) call abort
if (b(2) .ne. 13) call abort
if (b(3) .ne. 18) call abort
b = sum (a, 2, m .and. tr)
if (b(1) .ne. 11) call abort
if (b(2) .ne. 13) call abort
if (b(3) .ne. 18) call abort
write (line, 9000) sum (a, 2, m)
if (line .ne. ' 11 13 18') call abort

View File

@ -1,3 +1,67 @@
2005-04-13 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/19106
* m4/iforeach.c (name`'rtype_qual`_'atype_code): Add TODO
that setting correct strides is a front end job.
(`m'name`'rtype_qual`_'atype_code): Likewise. If mask has
a lowest stride of 0, adjust to 1.
* m4/ifunction.c (name`'rtype_qual`_'atype_code): Add TODO
that setting correct strides is a front end job.
(`m'name`'rtype_qual`_'atype_code): Likewise. If mask has
a lowest stride of 0, adjust to 1.
* maxloc0_4_i4.c: Regenerated
* maxloc0_4_i8.c: Regenerated
* maxloc0_4_r4.c: Regenerated
* maxloc0_4_r8.c: Regenerated
* maxloc0_8_i4.c: Regenerated
* maxloc0_8_i8.c: Regenerated
* maxloc0_8_r4.c: Regenerated
* maxloc0_8_r8.c: Regenerated
* maxloc1_4_i4.c: Regenerated
* maxloc1_4_i8.c: Regenerated
* maxloc1_4_r4.c: Regenerated
* maxloc1_4_r8.c: Regenerated
* maxloc1_8_i4.c: Regenerated
* maxloc1_8_i8.c: Regenerated
* maxloc1_8_r4.c: Regenerated
* maxloc1_8_r8.c: Regenerated
* maxval_i4.c: Regenerated
* maxval_i8.c: Regenerated
* maxval_r4.c: Regenerated
* maxval_r8.c: Regenerated
* minloc0_4_i4.c: Regenerated
* minloc0_4_i8.c: Regenerated
* minloc0_4_r4.c: Regenerated
* minloc0_4_r8.c: Regenerated
* minloc0_8_i4.c: Regenerated
* minloc0_8_i8.c: Regenerated
* minloc0_8_r4.c: Regenerated
* minloc0_8_r8.c: Regenerated
* minloc1_4_i4.c: Regenerated
* minloc1_4_i8.c: Regenerated
* minloc1_4_r4.c: Regenerated
* minloc1_4_r8.c: Regenerated
* minloc1_8_i4.c: Regenerated
* minloc1_8_i8.c: Regenerated
* minloc1_8_r4.c: Regenerated
* minloc1_8_r8.c: Regenerated
* minval_i4.c: Regenerated
* minval_i8.c: Regenerated
* minval_r4.c: Regenerated
* minval_r8.c: Regenerated
* product_c4.c: Regenerated
* product_c8.c: Regenerated
* product_i4.c: Regenerated
* product_i8.c: Regenerated
* product_r4.c: Regenerated
* product_r8.c: Regenerated
* sum_c4.c: Regenerated
* sum_c8.c: Regenerated
* sum_i4.c: Regenerated
* sum_i8.c: Regenerated
* sum_r4.c: Regenerated
* sum_r8.c: Regenerated
2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR libfortran/20788

View File

@ -195,6 +195,9 @@ mmaxloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
dstride = retarray->dim[0].stride;
dest = retarray->data;
for (n = 0; n < rank; n++)

View File

@ -195,6 +195,9 @@ mmaxloc0_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
dstride = retarray->dim[0].stride;
dest = retarray->data;
for (n = 0; n < rank; n++)

View File

@ -195,6 +195,9 @@ mmaxloc0_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
dstride = retarray->dim[0].stride;
dest = retarray->data;
for (n = 0; n < rank; n++)

View File

@ -195,6 +195,9 @@ mmaxloc0_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
dstride = retarray->dim[0].stride;
dest = retarray->data;
for (n = 0; n < rank; n++)

View File

@ -195,6 +195,9 @@ mmaxloc0_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
dstride = retarray->dim[0].stride;
dest = retarray->data;
for (n = 0; n < rank; n++)

View File

@ -195,6 +195,9 @@ mmaxloc0_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
dstride = retarray->dim[0].stride;
dest = retarray->data;
for (n = 0; n < rank; n++)

View File

@ -195,6 +195,9 @@ mmaxloc0_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
dstride = retarray->dim[0].stride;
dest = retarray->data;
for (n = 0; n < rank; n++)

View File

@ -195,6 +195,9 @@ mmaxloc0_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
dstride = retarray->dim[0].stride;
dest = retarray->data;
for (n = 0; n < rank; n++)

View File

@ -200,6 +200,9 @@ mmaxloc1_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -200,6 +200,9 @@ mmaxloc1_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -200,6 +200,9 @@ mmaxloc1_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -200,6 +200,9 @@ mmaxloc1_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -200,6 +200,9 @@ mmaxloc1_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -200,6 +200,9 @@ mmaxloc1_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -200,6 +200,9 @@ mmaxloc1_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -200,6 +200,9 @@ mmaxloc1_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -194,6 +194,9 @@ mmaxval_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -194,6 +194,9 @@ mmaxval_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -194,6 +194,9 @@ mmaxval_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -194,6 +194,9 @@ mmaxval_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -195,6 +195,9 @@ mminloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
dstride = retarray->dim[0].stride;
dest = retarray->data;
for (n = 0; n < rank; n++)
@ -238,7 +241,7 @@ mminloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array,
{
{
/* Implementation start. */
printf("mbase = %p, *mbase = %d, *base=%d\n");
if (*mbase && *base < minval)
{
minval = *base;

View File

@ -195,6 +195,9 @@ mminloc0_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
dstride = retarray->dim[0].stride;
dest = retarray->data;
for (n = 0; n < rank; n++)

View File

@ -195,6 +195,9 @@ mminloc0_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
dstride = retarray->dim[0].stride;
dest = retarray->data;
for (n = 0; n < rank; n++)

View File

@ -195,6 +195,9 @@ mminloc0_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
dstride = retarray->dim[0].stride;
dest = retarray->data;
for (n = 0; n < rank; n++)

View File

@ -195,6 +195,9 @@ mminloc0_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
dstride = retarray->dim[0].stride;
dest = retarray->data;
for (n = 0; n < rank; n++)

View File

@ -195,6 +195,9 @@ mminloc0_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
dstride = retarray->dim[0].stride;
dest = retarray->data;
for (n = 0; n < rank; n++)

View File

@ -195,6 +195,9 @@ mminloc0_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
dstride = retarray->dim[0].stride;
dest = retarray->data;
for (n = 0; n < rank; n++)

View File

@ -195,6 +195,9 @@ mminloc0_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
dstride = retarray->dim[0].stride;
dest = retarray->data;
for (n = 0; n < rank; n++)

View File

@ -200,6 +200,9 @@ mminloc1_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -200,6 +200,9 @@ mminloc1_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -200,6 +200,9 @@ mminloc1_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -200,6 +200,9 @@ mminloc1_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -200,6 +200,9 @@ mminloc1_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -200,6 +200,9 @@ mminloc1_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -200,6 +200,9 @@ mminloc1_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -200,6 +200,9 @@ mminloc1_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -194,6 +194,9 @@ mminval_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -194,6 +194,9 @@ mminval_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -194,6 +194,9 @@ mminval_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -194,6 +194,9 @@ mminval_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -192,6 +192,9 @@ mproduct_c4 (gfc_array_c4 * retarray, gfc_array_c4 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -192,6 +192,9 @@ mproduct_c8 (gfc_array_c8 * retarray, gfc_array_c8 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -192,6 +192,9 @@ mproduct_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -192,6 +192,9 @@ mproduct_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -192,6 +192,9 @@ mproduct_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -192,6 +192,9 @@ mproduct_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -192,6 +192,9 @@ msum_c4 (gfc_array_c4 * retarray, gfc_array_c4 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -192,6 +192,9 @@ msum_c8 (gfc_array_c8 * retarray, gfc_array_c8 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -192,6 +192,9 @@ msum_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -192,6 +192,9 @@ msum_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -192,6 +192,9 @@ msum_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -192,6 +192,9 @@ msum_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array,
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;

View File

@ -43,6 +43,9 @@ name`'rtype_qual`_'atype_code (rtype * retarray, atype *array)
if (retarray->dim[0].stride == 0)
retarray->dim[0].stride = 1;
}
/* TODO: It should be a front end job to correctly set the strides. */
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
@ -151,9 +154,14 @@ void
retarray->dim[0].stride = 1;
}
/* TODO: It should be a front end job to correctly set the strides. */
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
dstride = retarray->dim[0].stride;
dest = retarray->data;
for (n = 0; n < rank; n++)

View File

@ -40,6 +40,9 @@ name`'rtype_qual`_'atype_code (rtype *retarray, atype *array, index_type *pdim)
/* Make dim zero based to avoid confusion. */
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
/* TODO: It should be a front end job to correctly set the strides. */
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
@ -174,9 +177,15 @@ void
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
/* TODO: It should be a front end job to correctly set the strides. */
if (array->dim[0].stride == 0)
array->dim[0].stride = 1;
if (mask->dim[0].stride == 0)
mask->dim[0].stride = 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;