diff options
author | Thomas Koenig <Thomas.Koenig@online.de> | 2005-04-12 22:57:10 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2005-04-12 22:57:10 +0000 |
commit | c6abe94dc12e4f7e56b5439a081e0b11c6950d92 (patch) | |
tree | 58dbc9e3155db4ae6e94c97d110b72a66746c386 /libgfortran/m4 | |
parent | b3b51ded80e74bced9ece3be87ff3bfc05bc7b70 (diff) | |
download | gcc-c6abe94dc12e4f7e56b5439a081e0b11c6950d92.zip gcc-c6abe94dc12e4f7e56b5439a081e0b11c6950d92.tar.gz gcc-c6abe94dc12e4f7e56b5439a081e0b11c6950d92.tar.bz2 |
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
Diffstat (limited to 'libgfortran/m4')
-rw-r--r-- | libgfortran/m4/iforeach.m4 | 8 | ||||
-rw-r--r-- | libgfortran/m4/ifunction.m4 | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/libgfortran/m4/iforeach.m4 b/libgfortran/m4/iforeach.m4 index 616caf9..39af3af 100644 --- a/libgfortran/m4/iforeach.m4 +++ b/libgfortran/m4/iforeach.m4 @@ -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++) diff --git a/libgfortran/m4/ifunction.m4 b/libgfortran/m4/ifunction.m4 index b377677..82a74ef 100644 --- a/libgfortran/m4/ifunction.m4 +++ b/libgfortran/m4/ifunction.m4 @@ -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; |