diff options
author | Thomas Koenig <Thomas.Koenig@online.de> | 2005-05-04 21:38:23 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2005-05-04 21:38:23 +0000 |
commit | e33e218badc5501c9061b30ec5314649ecaeeb62 (patch) | |
tree | e67d83ffc94052a2e5db6bbbebcc19291313070a /libgfortran/generated | |
parent | 5b3ceafea524b632bf1ad2f56fc8e70817e1bc71 (diff) | |
download | gcc-e33e218badc5501c9061b30ec5314649ecaeeb62.zip gcc-e33e218badc5501c9061b30ec5314649ecaeeb62.tar.gz gcc-e33e218badc5501c9061b30ec5314649ecaeeb62.tar.bz2 |
re PR libfortran/21354 ([4.0 only] Rank 7 not handled correctly)
2005-05-04 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21354
* m4/cshift1.m4: Change dimension of auxiliary arrays from
GFC_MAX_DIMENSION - 1 to GFC_MAX_DIMENSION.
* m4/eoshift1.m4: Likewise.
* m4/eoshift3.m4: Likewise.
* m4/ifunction.m4: Likewise.
* m4/in_pack.m4: Likewise.
* m4/in_unpack.m4: Likewise.
* intrinsics/cshift0.c: Likewise.
* intrinsics/eoshift0.c: Likewise.
* intrinsics/eoshift2.c: Likewise.
* intrinsics/random.c: Likewise.
* intrinsics/spread_generic.c: Likewise.
* intrinsics/stat.c: Likewise.
* generated/all_l4.c: Regenerated.
* generated/all_l8.c: Regenerated.
* generated/any_l4.c: Regenerated.
* generated/any_l8.c: Regenerated.
* generated/count_4_l4.c: Regenerated.
* generated/count_4_l8.c: Regenerated.
* generated/count_8_l4.c: Regenerated.
* generated/count_8_l8.c: Regenerated.
* generated/cshift1_4.c: Regenerated.
* generated/cshift1_8.c: Regenerated.
* generated/eoshift1_4.c: Regenerated.
* generated/eoshift1_8.c: Regenerated.
* generated/eoshift3_4.c: Regenerated.
* generated/eoshift3_8.c: Regenerated.
* generated/in_pack_i4.c: Regenerated.
* generated/in_pack_i8.c: Regenerated.
* generated/in_unpack_i4.c: Regenerated.
* generated/in_unpack_i8.c: Regenerated.
* generated/maxloc0_4_i4.c: Regenerated.
* generated/maxloc0_4_i8.c: Regenerated.
* generated/maxloc0_4_r4.c: Regenerated.
* generated/maxloc0_4_r8.c: Regenerated.
* generated/maxloc0_8_i4.c: Regenerated.
* generated/maxloc0_8_i8.c: Regenerated.
* generated/maxloc0_8_r4.c: Regenerated.
* generated/maxloc0_8_r8.c: Regenerated.
* generated/maxloc1_4_i4.c: Regenerated.
* generated/maxloc1_4_i8.c: Regenerated.
* generated/maxloc1_4_r4.c: Regenerated.
* generated/maxloc1_4_r8.c: Regenerated.
* generated/maxloc1_8_i4.c: Regenerated.
* generated/maxloc1_8_i8.c: Regenerated.
* generated/maxloc1_8_r4.c: Regenerated.
* generated/maxloc1_8_r8.c: Regenerated.
* generated/maxval_i4.c: Regenerated.
* generated/maxval_i8.c: Regenerated.
* generated/maxval_r4.c: Regenerated.
* generated/maxval_r8.c: Regenerated.
* generated/minloc0_4_i4.c: Regenerated.
* generated/minloc0_4_i8.c: Regenerated.
* generated/minloc0_4_r4.c: Regenerated.
* generated/minloc0_4_r8.c: Regenerated.
* generated/minloc0_8_i4.c: Regenerated.
* generated/minloc0_8_i8.c: Regenerated.
* generated/minloc0_8_r4.c: Regenerated.
* generated/minloc0_8_r8.c: Regenerated.
* generated/minloc1_4_i4.c: Regenerated.
* generated/minloc1_4_i8.c: Regenerated.
* generated/minloc1_4_r4.c: Regenerated.
* generated/minloc1_4_r8.c: Regenerated.
* generated/minloc1_8_i4.c: Regenerated.
* generated/minloc1_8_i8.c: Regenerated.
* generated/minloc1_8_r4.c: Regenerated.
* generated/minloc1_8_r8.c: Regenerated.
* generated/minval_i4.c: Regenerated.
* generated/minval_i8.c: Regenerated.
* generated/minval_r4.c: Regenerated.
* generated/minval_r8.c: Regenerated.
* generated/product_c4.c: Regenerated.
* generated/product_c8.c: Regenerated.
* generated/product_i4.c: Regenerated.
* generated/product_i8.c: Regenerated.
* generated/product_r4.c: Regenerated.
* generated/product_r8.c: Regenerated.
* generated/sum_c4.c: Regenerated.
* generated/sum_c8.c: Regenerated.
* generated/sum_i4.c: Regenerated.
* generated/sum_i8.c: Regenerated.
* generated/sum_r4.c: Regenerated.
* generated/sum_r8.c: Regenerated.
2005-05-04 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21354
gfortran.dg/in_pack_rank7.f90: New test.
From-SVN: r99232
Diffstat (limited to 'libgfortran/generated')
70 files changed, 697 insertions, 401 deletions
diff --git a/libgfortran/generated/all_l4.c b/libgfortran/generated/all_l4.c index 84062e6..2b070bb 100644 --- a/libgfortran/generated/all_l4.c +++ b/libgfortran/generated/all_l4.c @@ -40,10 +40,10 @@ export_proto(all_l4); void all_l4 (gfc_array_l4 *retarray, gfc_array_l4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_LOGICAL_4 *base; GFC_LOGICAL_4 *dest; index_type rank; diff --git a/libgfortran/generated/all_l8.c b/libgfortran/generated/all_l8.c index bc8e500..29f4e26 100644 --- a/libgfortran/generated/all_l8.c +++ b/libgfortran/generated/all_l8.c @@ -40,10 +40,10 @@ export_proto(all_l8); void all_l8 (gfc_array_l8 *retarray, gfc_array_l8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_LOGICAL_8 *base; GFC_LOGICAL_8 *dest; index_type rank; diff --git a/libgfortran/generated/any_l4.c b/libgfortran/generated/any_l4.c index 8216691..0dfbc7a 100644 --- a/libgfortran/generated/any_l4.c +++ b/libgfortran/generated/any_l4.c @@ -40,10 +40,10 @@ export_proto(any_l4); void any_l4 (gfc_array_l4 *retarray, gfc_array_l4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_LOGICAL_4 *base; GFC_LOGICAL_4 *dest; index_type rank; diff --git a/libgfortran/generated/any_l8.c b/libgfortran/generated/any_l8.c index 3c3a374..94e4e27 100644 --- a/libgfortran/generated/any_l8.c +++ b/libgfortran/generated/any_l8.c @@ -40,10 +40,10 @@ export_proto(any_l8); void any_l8 (gfc_array_l8 *retarray, gfc_array_l8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_LOGICAL_8 *base; GFC_LOGICAL_8 *dest; index_type rank; diff --git a/libgfortran/generated/count_4_l4.c b/libgfortran/generated/count_4_l4.c index 814dbd4..3f43cc1 100644 --- a/libgfortran/generated/count_4_l4.c +++ b/libgfortran/generated/count_4_l4.c @@ -40,10 +40,10 @@ export_proto(count_4_l4); void count_4_l4 (gfc_array_i4 *retarray, gfc_array_l4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_LOGICAL_4 *base; GFC_INTEGER_4 *dest; index_type rank; diff --git a/libgfortran/generated/count_4_l8.c b/libgfortran/generated/count_4_l8.c index cffbef6..e8da4ef 100644 --- a/libgfortran/generated/count_4_l8.c +++ b/libgfortran/generated/count_4_l8.c @@ -40,10 +40,10 @@ export_proto(count_4_l8); void count_4_l8 (gfc_array_i4 *retarray, gfc_array_l8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_LOGICAL_8 *base; GFC_INTEGER_4 *dest; index_type rank; diff --git a/libgfortran/generated/count_8_l4.c b/libgfortran/generated/count_8_l4.c index d1705bb..fe4c886 100644 --- a/libgfortran/generated/count_8_l4.c +++ b/libgfortran/generated/count_8_l4.c @@ -40,10 +40,10 @@ export_proto(count_8_l4); void count_8_l4 (gfc_array_i8 *retarray, gfc_array_l4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_LOGICAL_4 *base; GFC_INTEGER_8 *dest; index_type rank; diff --git a/libgfortran/generated/count_8_l8.c b/libgfortran/generated/count_8_l8.c index 431b11e..0bcfdb8 100644 --- a/libgfortran/generated/count_8_l8.c +++ b/libgfortran/generated/count_8_l8.c @@ -40,10 +40,10 @@ export_proto(count_8_l8); void count_8_l8 (gfc_array_i8 *retarray, gfc_array_l8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_LOGICAL_8 *base; GFC_INTEGER_8 *dest; index_type rank; diff --git a/libgfortran/generated/cshift1_4.c b/libgfortran/generated/cshift1_4.c index b8c8ab3..683ce70 100644 --- a/libgfortran/generated/cshift1_4.c +++ b/libgfortran/generated/cshift1_4.c @@ -45,24 +45,24 @@ cshift1_4 (const gfc_array_char * ret, const gfc_array_i4 * h, const GFC_INTEGER_4 * pwhich) { /* r.* indicates the return array. */ - index_type rstride[GFC_MAX_DIMENSIONS - 1]; + index_type rstride[GFC_MAX_DIMENSIONS]; index_type rstride0; index_type roffset; char *rptr; char *dest; /* s.* indicates the source array. */ - index_type sstride[GFC_MAX_DIMENSIONS - 1]; + index_type sstride[GFC_MAX_DIMENSIONS]; index_type sstride0; index_type soffset; const char *sptr; const char *src; /* h.* indicates the array. */ - index_type hstride[GFC_MAX_DIMENSIONS - 1]; + index_type hstride[GFC_MAX_DIMENSIONS]; index_type hstride0; const GFC_INTEGER_4 *hptr; - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; index_type dim; index_type size; index_type len; diff --git a/libgfortran/generated/cshift1_8.c b/libgfortran/generated/cshift1_8.c index e185391..6513b91 100644 --- a/libgfortran/generated/cshift1_8.c +++ b/libgfortran/generated/cshift1_8.c @@ -45,24 +45,24 @@ cshift1_8 (const gfc_array_char * ret, const gfc_array_i8 * h, const GFC_INTEGER_8 * pwhich) { /* r.* indicates the return array. */ - index_type rstride[GFC_MAX_DIMENSIONS - 1]; + index_type rstride[GFC_MAX_DIMENSIONS]; index_type rstride0; index_type roffset; char *rptr; char *dest; /* s.* indicates the source array. */ - index_type sstride[GFC_MAX_DIMENSIONS - 1]; + index_type sstride[GFC_MAX_DIMENSIONS]; index_type sstride0; index_type soffset; const char *sptr; const char *src; /* h.* indicates the array. */ - index_type hstride[GFC_MAX_DIMENSIONS - 1]; + index_type hstride[GFC_MAX_DIMENSIONS]; index_type hstride0; const GFC_INTEGER_8 *hptr; - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; index_type dim; index_type size; index_type len; diff --git a/libgfortran/generated/eoshift1_4.c b/libgfortran/generated/eoshift1_4.c index 9c63a5c..6c2ad30 100644 --- a/libgfortran/generated/eoshift1_4.c +++ b/libgfortran/generated/eoshift1_4.c @@ -50,24 +50,24 @@ eoshift1_4 (const gfc_array_char *ret, const GFC_INTEGER_4 *pwhich) { /* r.* indicates the return array. */ - index_type rstride[GFC_MAX_DIMENSIONS - 1]; + index_type rstride[GFC_MAX_DIMENSIONS]; index_type rstride0; index_type roffset; char *rptr; char *dest; /* s.* indicates the source array. */ - index_type sstride[GFC_MAX_DIMENSIONS - 1]; + index_type sstride[GFC_MAX_DIMENSIONS]; index_type sstride0; index_type soffset; const char *sptr; const char *src; /* h.* indicates the shift array. */ - index_type hstride[GFC_MAX_DIMENSIONS - 1]; + index_type hstride[GFC_MAX_DIMENSIONS]; index_type hstride0; const GFC_INTEGER_4 *hptr; - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; index_type dim; index_type size; index_type len; diff --git a/libgfortran/generated/eoshift1_8.c b/libgfortran/generated/eoshift1_8.c index 3c70c9a..c1d99c3 100644 --- a/libgfortran/generated/eoshift1_8.c +++ b/libgfortran/generated/eoshift1_8.c @@ -50,24 +50,24 @@ eoshift1_8 (const gfc_array_char *ret, const GFC_INTEGER_8 *pwhich) { /* r.* indicates the return array. */ - index_type rstride[GFC_MAX_DIMENSIONS - 1]; + index_type rstride[GFC_MAX_DIMENSIONS]; index_type rstride0; index_type roffset; char *rptr; char *dest; /* s.* indicates the source array. */ - index_type sstride[GFC_MAX_DIMENSIONS - 1]; + index_type sstride[GFC_MAX_DIMENSIONS]; index_type sstride0; index_type soffset; const char *sptr; const char *src; /* h.* indicates the shift array. */ - index_type hstride[GFC_MAX_DIMENSIONS - 1]; + index_type hstride[GFC_MAX_DIMENSIONS]; index_type hstride0; const GFC_INTEGER_8 *hptr; - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; index_type dim; index_type size; index_type len; diff --git a/libgfortran/generated/eoshift3_4.c b/libgfortran/generated/eoshift3_4.c index 8f7913e..088cfbe 100644 --- a/libgfortran/generated/eoshift3_4.c +++ b/libgfortran/generated/eoshift3_4.c @@ -48,28 +48,28 @@ eoshift3_4 (gfc_array_char *ret, gfc_array_char *array, GFC_INTEGER_4 *pwhich) { /* r.* indicates the return array. */ - index_type rstride[GFC_MAX_DIMENSIONS - 1]; + index_type rstride[GFC_MAX_DIMENSIONS]; index_type rstride0; index_type roffset; char *rptr; char *dest; /* s.* indicates the source array. */ - index_type sstride[GFC_MAX_DIMENSIONS - 1]; + index_type sstride[GFC_MAX_DIMENSIONS]; index_type sstride0; index_type soffset; const char *sptr; const char *src; /* h.* indicates the shift array. */ - index_type hstride[GFC_MAX_DIMENSIONS - 1]; + index_type hstride[GFC_MAX_DIMENSIONS]; index_type hstride0; const GFC_INTEGER_4 *hptr; /* b.* indicates the bound array. */ - index_type bstride[GFC_MAX_DIMENSIONS - 1]; + index_type bstride[GFC_MAX_DIMENSIONS]; index_type bstride0; const char *bptr; - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; index_type dim; index_type size; index_type len; diff --git a/libgfortran/generated/eoshift3_8.c b/libgfortran/generated/eoshift3_8.c index 4c2e1d5..302b159 100644 --- a/libgfortran/generated/eoshift3_8.c +++ b/libgfortran/generated/eoshift3_8.c @@ -48,28 +48,28 @@ eoshift3_8 (gfc_array_char *ret, gfc_array_char *array, GFC_INTEGER_8 *pwhich) { /* r.* indicates the return array. */ - index_type rstride[GFC_MAX_DIMENSIONS - 1]; + index_type rstride[GFC_MAX_DIMENSIONS]; index_type rstride0; index_type roffset; char *rptr; char *dest; /* s.* indicates the source array. */ - index_type sstride[GFC_MAX_DIMENSIONS - 1]; + index_type sstride[GFC_MAX_DIMENSIONS]; index_type sstride0; index_type soffset; const char *sptr; const char *src; /* h.* indicates the shift array. */ - index_type hstride[GFC_MAX_DIMENSIONS - 1]; + index_type hstride[GFC_MAX_DIMENSIONS]; index_type hstride0; const GFC_INTEGER_8 *hptr; /* b.* indicates the bound array. */ - index_type bstride[GFC_MAX_DIMENSIONS - 1]; + index_type bstride[GFC_MAX_DIMENSIONS]; index_type bstride0; const char *bptr; - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; index_type dim; index_type size; index_type len; diff --git a/libgfortran/generated/in_pack_i4.c b/libgfortran/generated/in_pack_i4.c index ac0c34d..72a1519 100644 --- a/libgfortran/generated/in_pack_i4.c +++ b/libgfortran/generated/in_pack_i4.c @@ -39,9 +39,9 @@ Boston, MA 02111-1307, USA. */ GFC_INTEGER_4 * internal_pack_4 (gfc_array_i4 * source) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type stride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type stride[GFC_MAX_DIMENSIONS]; index_type stride0; index_type dim; index_type ssize; diff --git a/libgfortran/generated/in_pack_i8.c b/libgfortran/generated/in_pack_i8.c index 85ee822..51c6986 100644 --- a/libgfortran/generated/in_pack_i8.c +++ b/libgfortran/generated/in_pack_i8.c @@ -39,9 +39,9 @@ Boston, MA 02111-1307, USA. */ GFC_INTEGER_8 * internal_pack_8 (gfc_array_i8 * source) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type stride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type stride[GFC_MAX_DIMENSIONS]; index_type stride0; index_type dim; index_type ssize; diff --git a/libgfortran/generated/in_unpack_i4.c b/libgfortran/generated/in_unpack_i4.c index 8786100..92561a2 100644 --- a/libgfortran/generated/in_unpack_i4.c +++ b/libgfortran/generated/in_unpack_i4.c @@ -37,9 +37,9 @@ Boston, MA 02111-1307, USA. */ void internal_unpack_4 (gfc_array_i4 * d, const GFC_INTEGER_4 * src) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type stride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type stride[GFC_MAX_DIMENSIONS]; index_type stride0; index_type dim; index_type dsize; diff --git a/libgfortran/generated/in_unpack_i8.c b/libgfortran/generated/in_unpack_i8.c index a1686c3..1f3e6a2 100644 --- a/libgfortran/generated/in_unpack_i8.c +++ b/libgfortran/generated/in_unpack_i8.c @@ -37,9 +37,9 @@ Boston, MA 02111-1307, USA. */ void internal_unpack_8 (gfc_array_i8 * d, const GFC_INTEGER_8 * src) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type stride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type stride[GFC_MAX_DIMENSIONS]; index_type stride0; index_type dim; index_type dsize; diff --git a/libgfortran/generated/maxloc0_4_i4.c b/libgfortran/generated/maxloc0_4_i4.c index 94e2ec5..1839bdf 100644 --- a/libgfortran/generated/maxloc0_4_i4.c +++ b/libgfortran/generated/maxloc0_4_i4.c @@ -76,6 +76,9 @@ maxloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *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; @@ -192,6 +195,8 @@ mmaxloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, 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; diff --git a/libgfortran/generated/maxloc0_4_i8.c b/libgfortran/generated/maxloc0_4_i8.c index 85e0ea5..51aecb9 100644 --- a/libgfortran/generated/maxloc0_4_i8.c +++ b/libgfortran/generated/maxloc0_4_i8.c @@ -76,6 +76,9 @@ maxloc0_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *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; @@ -192,6 +195,8 @@ mmaxloc0_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array, 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; diff --git a/libgfortran/generated/maxloc0_4_r4.c b/libgfortran/generated/maxloc0_4_r4.c index 14f64e4..53fd0dc 100644 --- a/libgfortran/generated/maxloc0_4_r4.c +++ b/libgfortran/generated/maxloc0_4_r4.c @@ -76,6 +76,9 @@ maxloc0_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *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; @@ -192,6 +195,8 @@ mmaxloc0_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array, 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; diff --git a/libgfortran/generated/maxloc0_4_r8.c b/libgfortran/generated/maxloc0_4_r8.c index caa3388..612c8f6 100644 --- a/libgfortran/generated/maxloc0_4_r8.c +++ b/libgfortran/generated/maxloc0_4_r8.c @@ -76,6 +76,9 @@ maxloc0_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *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; @@ -192,6 +195,8 @@ mmaxloc0_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array, 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; diff --git a/libgfortran/generated/maxloc0_8_i4.c b/libgfortran/generated/maxloc0_8_i4.c index 6999ffa..c496e13 100644 --- a/libgfortran/generated/maxloc0_8_i4.c +++ b/libgfortran/generated/maxloc0_8_i4.c @@ -76,6 +76,9 @@ maxloc0_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *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; @@ -192,6 +195,8 @@ mmaxloc0_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array, 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; diff --git a/libgfortran/generated/maxloc0_8_i8.c b/libgfortran/generated/maxloc0_8_i8.c index 614e6df..1732564 100644 --- a/libgfortran/generated/maxloc0_8_i8.c +++ b/libgfortran/generated/maxloc0_8_i8.c @@ -76,6 +76,9 @@ maxloc0_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *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; @@ -192,6 +195,8 @@ mmaxloc0_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, 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; diff --git a/libgfortran/generated/maxloc0_8_r4.c b/libgfortran/generated/maxloc0_8_r4.c index b9e1950..96f4747 100644 --- a/libgfortran/generated/maxloc0_8_r4.c +++ b/libgfortran/generated/maxloc0_8_r4.c @@ -76,6 +76,9 @@ maxloc0_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *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; @@ -192,6 +195,8 @@ mmaxloc0_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array, 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; diff --git a/libgfortran/generated/maxloc0_8_r8.c b/libgfortran/generated/maxloc0_8_r8.c index b7e216b..36b3fcf 100644 --- a/libgfortran/generated/maxloc0_8_r8.c +++ b/libgfortran/generated/maxloc0_8_r8.c @@ -76,6 +76,9 @@ maxloc0_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *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; @@ -192,6 +195,8 @@ mmaxloc0_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array, 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; diff --git a/libgfortran/generated/maxloc1_4_i4.c b/libgfortran/generated/maxloc1_4_i4.c index deeb063..45e143f 100644 --- a/libgfortran/generated/maxloc1_4_i4.c +++ b/libgfortran/generated/maxloc1_4_i4.c @@ -42,10 +42,10 @@ export_proto(maxloc1_4_i4); void maxloc1_4_i4 (gfc_array_i4 *retarray, gfc_array_i4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *base; GFC_INTEGER_4 *dest; index_type rank; @@ -57,6 +57,9 @@ maxloc1_4_i4 (gfc_array_i4 *retarray, gfc_array_i4 *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; @@ -180,11 +183,11 @@ void mmaxloc1_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *dest; GFC_INTEGER_4 *base; GFC_LOGICAL_4 *mbase; @@ -197,6 +200,9 @@ mmaxloc1_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array, 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; diff --git a/libgfortran/generated/maxloc1_4_i8.c b/libgfortran/generated/maxloc1_4_i8.c index 80555e8..e196f93 100644 --- a/libgfortran/generated/maxloc1_4_i8.c +++ b/libgfortran/generated/maxloc1_4_i8.c @@ -42,10 +42,10 @@ export_proto(maxloc1_4_i8); void maxloc1_4_i8 (gfc_array_i4 *retarray, gfc_array_i8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *base; GFC_INTEGER_4 *dest; index_type rank; @@ -57,6 +57,9 @@ maxloc1_4_i8 (gfc_array_i4 *retarray, gfc_array_i8 *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; @@ -180,11 +183,11 @@ void mmaxloc1_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *dest; GFC_INTEGER_8 *base; GFC_LOGICAL_4 *mbase; @@ -197,6 +200,9 @@ mmaxloc1_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 * array, 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; diff --git a/libgfortran/generated/maxloc1_4_r4.c b/libgfortran/generated/maxloc1_4_r4.c index 55d5229..cabd0c7 100644 --- a/libgfortran/generated/maxloc1_4_r4.c +++ b/libgfortran/generated/maxloc1_4_r4.c @@ -42,10 +42,10 @@ export_proto(maxloc1_4_r4); void maxloc1_4_r4 (gfc_array_i4 *retarray, gfc_array_r4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_REAL_4 *base; GFC_INTEGER_4 *dest; index_type rank; @@ -57,6 +57,9 @@ maxloc1_4_r4 (gfc_array_i4 *retarray, gfc_array_r4 *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; @@ -180,11 +183,11 @@ void mmaxloc1_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *dest; GFC_REAL_4 *base; GFC_LOGICAL_4 *mbase; @@ -197,6 +200,9 @@ mmaxloc1_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 * array, 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; diff --git a/libgfortran/generated/maxloc1_4_r8.c b/libgfortran/generated/maxloc1_4_r8.c index aab24a1..44c38b8 100644 --- a/libgfortran/generated/maxloc1_4_r8.c +++ b/libgfortran/generated/maxloc1_4_r8.c @@ -42,10 +42,10 @@ export_proto(maxloc1_4_r8); void maxloc1_4_r8 (gfc_array_i4 *retarray, gfc_array_r8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_REAL_8 *base; GFC_INTEGER_4 *dest; index_type rank; @@ -57,6 +57,9 @@ maxloc1_4_r8 (gfc_array_i4 *retarray, gfc_array_r8 *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; @@ -180,11 +183,11 @@ void mmaxloc1_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *dest; GFC_REAL_8 *base; GFC_LOGICAL_4 *mbase; @@ -197,6 +200,9 @@ mmaxloc1_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 * array, 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; diff --git a/libgfortran/generated/maxloc1_8_i4.c b/libgfortran/generated/maxloc1_8_i4.c index 807be63..e05a8a2 100644 --- a/libgfortran/generated/maxloc1_8_i4.c +++ b/libgfortran/generated/maxloc1_8_i4.c @@ -42,10 +42,10 @@ export_proto(maxloc1_8_i4); void maxloc1_8_i4 (gfc_array_i8 *retarray, gfc_array_i4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *base; GFC_INTEGER_8 *dest; index_type rank; @@ -57,6 +57,9 @@ maxloc1_8_i4 (gfc_array_i8 *retarray, gfc_array_i4 *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; @@ -180,11 +183,11 @@ void mmaxloc1_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *dest; GFC_INTEGER_4 *base; GFC_LOGICAL_4 *mbase; @@ -197,6 +200,9 @@ mmaxloc1_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 * array, 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; diff --git a/libgfortran/generated/maxloc1_8_i8.c b/libgfortran/generated/maxloc1_8_i8.c index e86cd08..e2bf61c 100644 --- a/libgfortran/generated/maxloc1_8_i8.c +++ b/libgfortran/generated/maxloc1_8_i8.c @@ -42,10 +42,10 @@ export_proto(maxloc1_8_i8); void maxloc1_8_i8 (gfc_array_i8 *retarray, gfc_array_i8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *base; GFC_INTEGER_8 *dest; index_type rank; @@ -57,6 +57,9 @@ maxloc1_8_i8 (gfc_array_i8 *retarray, gfc_array_i8 *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; @@ -180,11 +183,11 @@ void mmaxloc1_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *dest; GFC_INTEGER_8 *base; GFC_LOGICAL_4 *mbase; @@ -197,6 +200,9 @@ mmaxloc1_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array, 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; diff --git a/libgfortran/generated/maxloc1_8_r4.c b/libgfortran/generated/maxloc1_8_r4.c index 584bfb4..acce8bc 100644 --- a/libgfortran/generated/maxloc1_8_r4.c +++ b/libgfortran/generated/maxloc1_8_r4.c @@ -42,10 +42,10 @@ export_proto(maxloc1_8_r4); void maxloc1_8_r4 (gfc_array_i8 *retarray, gfc_array_r4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_REAL_4 *base; GFC_INTEGER_8 *dest; index_type rank; @@ -57,6 +57,9 @@ maxloc1_8_r4 (gfc_array_i8 *retarray, gfc_array_r4 *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; @@ -180,11 +183,11 @@ void mmaxloc1_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *dest; GFC_REAL_4 *base; GFC_LOGICAL_4 *mbase; @@ -197,6 +200,9 @@ mmaxloc1_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 * array, 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; diff --git a/libgfortran/generated/maxloc1_8_r8.c b/libgfortran/generated/maxloc1_8_r8.c index 60c8c3d..f348722 100644 --- a/libgfortran/generated/maxloc1_8_r8.c +++ b/libgfortran/generated/maxloc1_8_r8.c @@ -42,10 +42,10 @@ export_proto(maxloc1_8_r8); void maxloc1_8_r8 (gfc_array_i8 *retarray, gfc_array_r8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_REAL_8 *base; GFC_INTEGER_8 *dest; index_type rank; @@ -57,6 +57,9 @@ maxloc1_8_r8 (gfc_array_i8 *retarray, gfc_array_r8 *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; @@ -180,11 +183,11 @@ void mmaxloc1_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *dest; GFC_REAL_8 *base; GFC_LOGICAL_4 *mbase; @@ -197,6 +200,9 @@ mmaxloc1_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 * array, 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; diff --git a/libgfortran/generated/maxval_i4.c b/libgfortran/generated/maxval_i4.c index 0bf088f..bf9d7121 100644 --- a/libgfortran/generated/maxval_i4.c +++ b/libgfortran/generated/maxval_i4.c @@ -41,10 +41,10 @@ export_proto(maxval_i4); void maxval_i4 (gfc_array_i4 *retarray, gfc_array_i4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *base; GFC_INTEGER_4 *dest; index_type rank; @@ -56,6 +56,9 @@ maxval_i4 (gfc_array_i4 *retarray, gfc_array_i4 *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,11 +177,11 @@ void mmaxval_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *dest; GFC_INTEGER_4 *base; GFC_LOGICAL_4 *mbase; @@ -191,6 +194,9 @@ mmaxval_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array, 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; diff --git a/libgfortran/generated/maxval_i8.c b/libgfortran/generated/maxval_i8.c index 2acdef9..175b7f3 100644 --- a/libgfortran/generated/maxval_i8.c +++ b/libgfortran/generated/maxval_i8.c @@ -41,10 +41,10 @@ export_proto(maxval_i8); void maxval_i8 (gfc_array_i8 *retarray, gfc_array_i8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *base; GFC_INTEGER_8 *dest; index_type rank; @@ -56,6 +56,9 @@ maxval_i8 (gfc_array_i8 *retarray, gfc_array_i8 *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,11 +177,11 @@ void mmaxval_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *dest; GFC_INTEGER_8 *base; GFC_LOGICAL_4 *mbase; @@ -191,6 +194,9 @@ mmaxval_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array, 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; diff --git a/libgfortran/generated/maxval_r4.c b/libgfortran/generated/maxval_r4.c index 46948b9..fc86f69 100644 --- a/libgfortran/generated/maxval_r4.c +++ b/libgfortran/generated/maxval_r4.c @@ -41,10 +41,10 @@ export_proto(maxval_r4); void maxval_r4 (gfc_array_r4 *retarray, gfc_array_r4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_REAL_4 *base; GFC_REAL_4 *dest; index_type rank; @@ -56,6 +56,9 @@ maxval_r4 (gfc_array_r4 *retarray, gfc_array_r4 *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,11 +177,11 @@ void mmaxval_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_REAL_4 *dest; GFC_REAL_4 *base; GFC_LOGICAL_4 *mbase; @@ -191,6 +194,9 @@ mmaxval_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array, 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; diff --git a/libgfortran/generated/maxval_r8.c b/libgfortran/generated/maxval_r8.c index b7bb89c..3d1a1cf 100644 --- a/libgfortran/generated/maxval_r8.c +++ b/libgfortran/generated/maxval_r8.c @@ -41,10 +41,10 @@ export_proto(maxval_r8); void maxval_r8 (gfc_array_r8 *retarray, gfc_array_r8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_REAL_8 *base; GFC_REAL_8 *dest; index_type rank; @@ -56,6 +56,9 @@ maxval_r8 (gfc_array_r8 *retarray, gfc_array_r8 *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,11 +177,11 @@ void mmaxval_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_REAL_8 *dest; GFC_REAL_8 *base; GFC_LOGICAL_4 *mbase; @@ -191,6 +194,9 @@ mmaxval_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array, 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; diff --git a/libgfortran/generated/minloc0_4_i4.c b/libgfortran/generated/minloc0_4_i4.c index 4bb7a5a..8f2dd23 100644 --- a/libgfortran/generated/minloc0_4_i4.c +++ b/libgfortran/generated/minloc0_4_i4.c @@ -76,6 +76,9 @@ minloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *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; @@ -192,6 +195,8 @@ mminloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, 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; @@ -241,7 +246,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; diff --git a/libgfortran/generated/minloc0_4_i8.c b/libgfortran/generated/minloc0_4_i8.c index 9d7a1a4..0a50caa 100644 --- a/libgfortran/generated/minloc0_4_i8.c +++ b/libgfortran/generated/minloc0_4_i8.c @@ -76,6 +76,9 @@ minloc0_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *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; @@ -192,6 +195,8 @@ mminloc0_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array, 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; diff --git a/libgfortran/generated/minloc0_4_r4.c b/libgfortran/generated/minloc0_4_r4.c index 3b54a3b..59809d7 100644 --- a/libgfortran/generated/minloc0_4_r4.c +++ b/libgfortran/generated/minloc0_4_r4.c @@ -76,6 +76,9 @@ minloc0_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *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; @@ -192,6 +195,8 @@ mminloc0_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array, 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; diff --git a/libgfortran/generated/minloc0_4_r8.c b/libgfortran/generated/minloc0_4_r8.c index 9866538..69d1cdb 100644 --- a/libgfortran/generated/minloc0_4_r8.c +++ b/libgfortran/generated/minloc0_4_r8.c @@ -76,6 +76,9 @@ minloc0_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *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; @@ -192,6 +195,8 @@ mminloc0_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array, 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; diff --git a/libgfortran/generated/minloc0_8_i4.c b/libgfortran/generated/minloc0_8_i4.c index 4440a9b..c8989fc 100644 --- a/libgfortran/generated/minloc0_8_i4.c +++ b/libgfortran/generated/minloc0_8_i4.c @@ -76,6 +76,9 @@ minloc0_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *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; @@ -192,6 +195,8 @@ mminloc0_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array, 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; diff --git a/libgfortran/generated/minloc0_8_i8.c b/libgfortran/generated/minloc0_8_i8.c index f2ee93c..8f1aa24 100644 --- a/libgfortran/generated/minloc0_8_i8.c +++ b/libgfortran/generated/minloc0_8_i8.c @@ -76,6 +76,9 @@ minloc0_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *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; @@ -192,6 +195,8 @@ mminloc0_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, 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; diff --git a/libgfortran/generated/minloc0_8_r4.c b/libgfortran/generated/minloc0_8_r4.c index 1f38c912..4407ddf 100644 --- a/libgfortran/generated/minloc0_8_r4.c +++ b/libgfortran/generated/minloc0_8_r4.c @@ -76,6 +76,9 @@ minloc0_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *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; @@ -192,6 +195,8 @@ mminloc0_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array, 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; diff --git a/libgfortran/generated/minloc0_8_r8.c b/libgfortran/generated/minloc0_8_r8.c index 773ab48..4683223 100644 --- a/libgfortran/generated/minloc0_8_r8.c +++ b/libgfortran/generated/minloc0_8_r8.c @@ -76,6 +76,9 @@ minloc0_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *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; @@ -192,6 +195,8 @@ mminloc0_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array, 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; diff --git a/libgfortran/generated/minloc1_4_i4.c b/libgfortran/generated/minloc1_4_i4.c index 8c99d83..04fadb6 100644 --- a/libgfortran/generated/minloc1_4_i4.c +++ b/libgfortran/generated/minloc1_4_i4.c @@ -42,10 +42,10 @@ export_proto(minloc1_4_i4); void minloc1_4_i4 (gfc_array_i4 *retarray, gfc_array_i4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *base; GFC_INTEGER_4 *dest; index_type rank; @@ -57,6 +57,9 @@ minloc1_4_i4 (gfc_array_i4 *retarray, gfc_array_i4 *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; @@ -180,11 +183,11 @@ void mminloc1_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *dest; GFC_INTEGER_4 *base; GFC_LOGICAL_4 *mbase; @@ -197,6 +200,9 @@ mminloc1_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array, 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; diff --git a/libgfortran/generated/minloc1_4_i8.c b/libgfortran/generated/minloc1_4_i8.c index 48596a6..b2922c8 100644 --- a/libgfortran/generated/minloc1_4_i8.c +++ b/libgfortran/generated/minloc1_4_i8.c @@ -42,10 +42,10 @@ export_proto(minloc1_4_i8); void minloc1_4_i8 (gfc_array_i4 *retarray, gfc_array_i8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *base; GFC_INTEGER_4 *dest; index_type rank; @@ -57,6 +57,9 @@ minloc1_4_i8 (gfc_array_i4 *retarray, gfc_array_i8 *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; @@ -180,11 +183,11 @@ void mminloc1_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *dest; GFC_INTEGER_8 *base; GFC_LOGICAL_4 *mbase; @@ -197,6 +200,9 @@ mminloc1_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 * array, 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; diff --git a/libgfortran/generated/minloc1_4_r4.c b/libgfortran/generated/minloc1_4_r4.c index 0b9d15c..efec585 100644 --- a/libgfortran/generated/minloc1_4_r4.c +++ b/libgfortran/generated/minloc1_4_r4.c @@ -42,10 +42,10 @@ export_proto(minloc1_4_r4); void minloc1_4_r4 (gfc_array_i4 *retarray, gfc_array_r4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_REAL_4 *base; GFC_INTEGER_4 *dest; index_type rank; @@ -57,6 +57,9 @@ minloc1_4_r4 (gfc_array_i4 *retarray, gfc_array_r4 *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; @@ -180,11 +183,11 @@ void mminloc1_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *dest; GFC_REAL_4 *base; GFC_LOGICAL_4 *mbase; @@ -197,6 +200,9 @@ mminloc1_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 * array, 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; diff --git a/libgfortran/generated/minloc1_4_r8.c b/libgfortran/generated/minloc1_4_r8.c index 25d366a..95bc2a6 100644 --- a/libgfortran/generated/minloc1_4_r8.c +++ b/libgfortran/generated/minloc1_4_r8.c @@ -42,10 +42,10 @@ export_proto(minloc1_4_r8); void minloc1_4_r8 (gfc_array_i4 *retarray, gfc_array_r8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_REAL_8 *base; GFC_INTEGER_4 *dest; index_type rank; @@ -57,6 +57,9 @@ minloc1_4_r8 (gfc_array_i4 *retarray, gfc_array_r8 *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; @@ -180,11 +183,11 @@ void mminloc1_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *dest; GFC_REAL_8 *base; GFC_LOGICAL_4 *mbase; @@ -197,6 +200,9 @@ mminloc1_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 * array, 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; diff --git a/libgfortran/generated/minloc1_8_i4.c b/libgfortran/generated/minloc1_8_i4.c index a57efe6..11b1f71 100644 --- a/libgfortran/generated/minloc1_8_i4.c +++ b/libgfortran/generated/minloc1_8_i4.c @@ -42,10 +42,10 @@ export_proto(minloc1_8_i4); void minloc1_8_i4 (gfc_array_i8 *retarray, gfc_array_i4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *base; GFC_INTEGER_8 *dest; index_type rank; @@ -57,6 +57,9 @@ minloc1_8_i4 (gfc_array_i8 *retarray, gfc_array_i4 *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; @@ -180,11 +183,11 @@ void mminloc1_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *dest; GFC_INTEGER_4 *base; GFC_LOGICAL_4 *mbase; @@ -197,6 +200,9 @@ mminloc1_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 * array, 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; diff --git a/libgfortran/generated/minloc1_8_i8.c b/libgfortran/generated/minloc1_8_i8.c index 5e1603a..4235bde 100644 --- a/libgfortran/generated/minloc1_8_i8.c +++ b/libgfortran/generated/minloc1_8_i8.c @@ -42,10 +42,10 @@ export_proto(minloc1_8_i8); void minloc1_8_i8 (gfc_array_i8 *retarray, gfc_array_i8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *base; GFC_INTEGER_8 *dest; index_type rank; @@ -57,6 +57,9 @@ minloc1_8_i8 (gfc_array_i8 *retarray, gfc_array_i8 *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; @@ -180,11 +183,11 @@ void mminloc1_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *dest; GFC_INTEGER_8 *base; GFC_LOGICAL_4 *mbase; @@ -197,6 +200,9 @@ mminloc1_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array, 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; diff --git a/libgfortran/generated/minloc1_8_r4.c b/libgfortran/generated/minloc1_8_r4.c index 643765a..a679a65 100644 --- a/libgfortran/generated/minloc1_8_r4.c +++ b/libgfortran/generated/minloc1_8_r4.c @@ -42,10 +42,10 @@ export_proto(minloc1_8_r4); void minloc1_8_r4 (gfc_array_i8 *retarray, gfc_array_r4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_REAL_4 *base; GFC_INTEGER_8 *dest; index_type rank; @@ -57,6 +57,9 @@ minloc1_8_r4 (gfc_array_i8 *retarray, gfc_array_r4 *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; @@ -180,11 +183,11 @@ void mminloc1_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *dest; GFC_REAL_4 *base; GFC_LOGICAL_4 *mbase; @@ -197,6 +200,9 @@ mminloc1_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 * array, 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; diff --git a/libgfortran/generated/minloc1_8_r8.c b/libgfortran/generated/minloc1_8_r8.c index 7d2dc41..177ba6d 100644 --- a/libgfortran/generated/minloc1_8_r8.c +++ b/libgfortran/generated/minloc1_8_r8.c @@ -42,10 +42,10 @@ export_proto(minloc1_8_r8); void minloc1_8_r8 (gfc_array_i8 *retarray, gfc_array_r8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_REAL_8 *base; GFC_INTEGER_8 *dest; index_type rank; @@ -57,6 +57,9 @@ minloc1_8_r8 (gfc_array_i8 *retarray, gfc_array_r8 *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; @@ -180,11 +183,11 @@ void mminloc1_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *dest; GFC_REAL_8 *base; GFC_LOGICAL_4 *mbase; @@ -197,6 +200,9 @@ mminloc1_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 * array, 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; diff --git a/libgfortran/generated/minval_i4.c b/libgfortran/generated/minval_i4.c index d0a8a5e..0974196 100644 --- a/libgfortran/generated/minval_i4.c +++ b/libgfortran/generated/minval_i4.c @@ -41,10 +41,10 @@ export_proto(minval_i4); void minval_i4 (gfc_array_i4 *retarray, gfc_array_i4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *base; GFC_INTEGER_4 *dest; index_type rank; @@ -56,6 +56,9 @@ minval_i4 (gfc_array_i4 *retarray, gfc_array_i4 *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,11 +177,11 @@ void mminval_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *dest; GFC_INTEGER_4 *base; GFC_LOGICAL_4 *mbase; @@ -191,6 +194,9 @@ mminval_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array, 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; diff --git a/libgfortran/generated/minval_i8.c b/libgfortran/generated/minval_i8.c index 9d44514..a969bfd 100644 --- a/libgfortran/generated/minval_i8.c +++ b/libgfortran/generated/minval_i8.c @@ -41,10 +41,10 @@ export_proto(minval_i8); void minval_i8 (gfc_array_i8 *retarray, gfc_array_i8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *base; GFC_INTEGER_8 *dest; index_type rank; @@ -56,6 +56,9 @@ minval_i8 (gfc_array_i8 *retarray, gfc_array_i8 *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,11 +177,11 @@ void mminval_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *dest; GFC_INTEGER_8 *base; GFC_LOGICAL_4 *mbase; @@ -191,6 +194,9 @@ mminval_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array, 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; diff --git a/libgfortran/generated/minval_r4.c b/libgfortran/generated/minval_r4.c index 4220d87..fe1a224 100644 --- a/libgfortran/generated/minval_r4.c +++ b/libgfortran/generated/minval_r4.c @@ -41,10 +41,10 @@ export_proto(minval_r4); void minval_r4 (gfc_array_r4 *retarray, gfc_array_r4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_REAL_4 *base; GFC_REAL_4 *dest; index_type rank; @@ -56,6 +56,9 @@ minval_r4 (gfc_array_r4 *retarray, gfc_array_r4 *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,11 +177,11 @@ void mminval_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_REAL_4 *dest; GFC_REAL_4 *base; GFC_LOGICAL_4 *mbase; @@ -191,6 +194,9 @@ mminval_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array, 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; diff --git a/libgfortran/generated/minval_r8.c b/libgfortran/generated/minval_r8.c index d6c5b00..050b3c9 100644 --- a/libgfortran/generated/minval_r8.c +++ b/libgfortran/generated/minval_r8.c @@ -41,10 +41,10 @@ export_proto(minval_r8); void minval_r8 (gfc_array_r8 *retarray, gfc_array_r8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_REAL_8 *base; GFC_REAL_8 *dest; index_type rank; @@ -56,6 +56,9 @@ minval_r8 (gfc_array_r8 *retarray, gfc_array_r8 *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,11 +177,11 @@ void mminval_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_REAL_8 *dest; GFC_REAL_8 *base; GFC_LOGICAL_4 *mbase; @@ -191,6 +194,9 @@ mminval_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array, 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; diff --git a/libgfortran/generated/product_c4.c b/libgfortran/generated/product_c4.c index d20ad9b..2cee797 100644 --- a/libgfortran/generated/product_c4.c +++ b/libgfortran/generated/product_c4.c @@ -40,10 +40,10 @@ export_proto(product_c4); void product_c4 (gfc_array_c4 *retarray, gfc_array_c4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_COMPLEX_4 *base; GFC_COMPLEX_4 *dest; index_type rank; @@ -55,6 +55,9 @@ product_c4 (gfc_array_c4 *retarray, gfc_array_c4 *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; @@ -172,11 +175,11 @@ void mproduct_c4 (gfc_array_c4 * retarray, gfc_array_c4 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_COMPLEX_4 *dest; GFC_COMPLEX_4 *base; GFC_LOGICAL_4 *mbase; @@ -189,6 +192,9 @@ mproduct_c4 (gfc_array_c4 * retarray, gfc_array_c4 * array, 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; diff --git a/libgfortran/generated/product_c8.c b/libgfortran/generated/product_c8.c index 706e973..6eaeb7a 100644 --- a/libgfortran/generated/product_c8.c +++ b/libgfortran/generated/product_c8.c @@ -40,10 +40,10 @@ export_proto(product_c8); void product_c8 (gfc_array_c8 *retarray, gfc_array_c8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_COMPLEX_8 *base; GFC_COMPLEX_8 *dest; index_type rank; @@ -55,6 +55,9 @@ product_c8 (gfc_array_c8 *retarray, gfc_array_c8 *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; @@ -172,11 +175,11 @@ void mproduct_c8 (gfc_array_c8 * retarray, gfc_array_c8 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_COMPLEX_8 *dest; GFC_COMPLEX_8 *base; GFC_LOGICAL_4 *mbase; @@ -189,6 +192,9 @@ mproduct_c8 (gfc_array_c8 * retarray, gfc_array_c8 * array, 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; diff --git a/libgfortran/generated/product_i4.c b/libgfortran/generated/product_i4.c index f8f86d6..0a58d04 100644 --- a/libgfortran/generated/product_i4.c +++ b/libgfortran/generated/product_i4.c @@ -40,10 +40,10 @@ export_proto(product_i4); void product_i4 (gfc_array_i4 *retarray, gfc_array_i4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *base; GFC_INTEGER_4 *dest; index_type rank; @@ -55,6 +55,9 @@ product_i4 (gfc_array_i4 *retarray, gfc_array_i4 *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; @@ -172,11 +175,11 @@ void mproduct_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *dest; GFC_INTEGER_4 *base; GFC_LOGICAL_4 *mbase; @@ -189,6 +192,9 @@ mproduct_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array, 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; diff --git a/libgfortran/generated/product_i8.c b/libgfortran/generated/product_i8.c index 00ae28b..1e61c52 100644 --- a/libgfortran/generated/product_i8.c +++ b/libgfortran/generated/product_i8.c @@ -40,10 +40,10 @@ export_proto(product_i8); void product_i8 (gfc_array_i8 *retarray, gfc_array_i8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *base; GFC_INTEGER_8 *dest; index_type rank; @@ -55,6 +55,9 @@ product_i8 (gfc_array_i8 *retarray, gfc_array_i8 *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; @@ -172,11 +175,11 @@ void mproduct_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *dest; GFC_INTEGER_8 *base; GFC_LOGICAL_4 *mbase; @@ -189,6 +192,9 @@ mproduct_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array, 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; diff --git a/libgfortran/generated/product_r4.c b/libgfortran/generated/product_r4.c index ea377bb..586c80c 100644 --- a/libgfortran/generated/product_r4.c +++ b/libgfortran/generated/product_r4.c @@ -40,10 +40,10 @@ export_proto(product_r4); void product_r4 (gfc_array_r4 *retarray, gfc_array_r4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_REAL_4 *base; GFC_REAL_4 *dest; index_type rank; @@ -55,6 +55,9 @@ product_r4 (gfc_array_r4 *retarray, gfc_array_r4 *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; @@ -172,11 +175,11 @@ void mproduct_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_REAL_4 *dest; GFC_REAL_4 *base; GFC_LOGICAL_4 *mbase; @@ -189,6 +192,9 @@ mproduct_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array, 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; diff --git a/libgfortran/generated/product_r8.c b/libgfortran/generated/product_r8.c index 58d22cf..3be0151 100644 --- a/libgfortran/generated/product_r8.c +++ b/libgfortran/generated/product_r8.c @@ -40,10 +40,10 @@ export_proto(product_r8); void product_r8 (gfc_array_r8 *retarray, gfc_array_r8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_REAL_8 *base; GFC_REAL_8 *dest; index_type rank; @@ -55,6 +55,9 @@ product_r8 (gfc_array_r8 *retarray, gfc_array_r8 *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; @@ -172,11 +175,11 @@ void mproduct_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_REAL_8 *dest; GFC_REAL_8 *base; GFC_LOGICAL_4 *mbase; @@ -189,6 +192,9 @@ mproduct_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array, 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; diff --git a/libgfortran/generated/sum_c4.c b/libgfortran/generated/sum_c4.c index d9b36d8..89b32f0 100644 --- a/libgfortran/generated/sum_c4.c +++ b/libgfortran/generated/sum_c4.c @@ -40,10 +40,10 @@ export_proto(sum_c4); void sum_c4 (gfc_array_c4 *retarray, gfc_array_c4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_COMPLEX_4 *base; GFC_COMPLEX_4 *dest; index_type rank; @@ -55,6 +55,9 @@ sum_c4 (gfc_array_c4 *retarray, gfc_array_c4 *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; @@ -172,11 +175,11 @@ void msum_c4 (gfc_array_c4 * retarray, gfc_array_c4 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_COMPLEX_4 *dest; GFC_COMPLEX_4 *base; GFC_LOGICAL_4 *mbase; @@ -189,6 +192,9 @@ msum_c4 (gfc_array_c4 * retarray, gfc_array_c4 * array, 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; diff --git a/libgfortran/generated/sum_c8.c b/libgfortran/generated/sum_c8.c index a5c44cd..c7674eb 100644 --- a/libgfortran/generated/sum_c8.c +++ b/libgfortran/generated/sum_c8.c @@ -40,10 +40,10 @@ export_proto(sum_c8); void sum_c8 (gfc_array_c8 *retarray, gfc_array_c8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_COMPLEX_8 *base; GFC_COMPLEX_8 *dest; index_type rank; @@ -55,6 +55,9 @@ sum_c8 (gfc_array_c8 *retarray, gfc_array_c8 *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; @@ -172,11 +175,11 @@ void msum_c8 (gfc_array_c8 * retarray, gfc_array_c8 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_COMPLEX_8 *dest; GFC_COMPLEX_8 *base; GFC_LOGICAL_4 *mbase; @@ -189,6 +192,9 @@ msum_c8 (gfc_array_c8 * retarray, gfc_array_c8 * array, 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; diff --git a/libgfortran/generated/sum_i4.c b/libgfortran/generated/sum_i4.c index b10798f..76106bf 100644 --- a/libgfortran/generated/sum_i4.c +++ b/libgfortran/generated/sum_i4.c @@ -40,10 +40,10 @@ export_proto(sum_i4); void sum_i4 (gfc_array_i4 *retarray, gfc_array_i4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *base; GFC_INTEGER_4 *dest; index_type rank; @@ -55,6 +55,9 @@ sum_i4 (gfc_array_i4 *retarray, gfc_array_i4 *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; @@ -172,11 +175,11 @@ void msum_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_4 *dest; GFC_INTEGER_4 *base; GFC_LOGICAL_4 *mbase; @@ -189,6 +192,9 @@ msum_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array, 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; diff --git a/libgfortran/generated/sum_i8.c b/libgfortran/generated/sum_i8.c index 0d3e191..16d0411 100644 --- a/libgfortran/generated/sum_i8.c +++ b/libgfortran/generated/sum_i8.c @@ -40,10 +40,10 @@ export_proto(sum_i8); void sum_i8 (gfc_array_i8 *retarray, gfc_array_i8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *base; GFC_INTEGER_8 *dest; index_type rank; @@ -55,6 +55,9 @@ sum_i8 (gfc_array_i8 *retarray, gfc_array_i8 *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; @@ -172,11 +175,11 @@ void msum_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_INTEGER_8 *dest; GFC_INTEGER_8 *base; GFC_LOGICAL_4 *mbase; @@ -189,6 +192,9 @@ msum_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array, 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; diff --git a/libgfortran/generated/sum_r4.c b/libgfortran/generated/sum_r4.c index c0a81d5..c9b36cd 100644 --- a/libgfortran/generated/sum_r4.c +++ b/libgfortran/generated/sum_r4.c @@ -40,10 +40,10 @@ export_proto(sum_r4); void sum_r4 (gfc_array_r4 *retarray, gfc_array_r4 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_REAL_4 *base; GFC_REAL_4 *dest; index_type rank; @@ -55,6 +55,9 @@ sum_r4 (gfc_array_r4 *retarray, gfc_array_r4 *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; @@ -172,11 +175,11 @@ void msum_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_REAL_4 *dest; GFC_REAL_4 *base; GFC_LOGICAL_4 *mbase; @@ -189,6 +192,9 @@ msum_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array, 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; diff --git a/libgfortran/generated/sum_r8.c b/libgfortran/generated/sum_r8.c index 190cabb..a4d2605 100644 --- a/libgfortran/generated/sum_r8.c +++ b/libgfortran/generated/sum_r8.c @@ -40,10 +40,10 @@ export_proto(sum_r8); void sum_r8 (gfc_array_r8 *retarray, gfc_array_r8 *array, index_type *pdim) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; GFC_REAL_8 *base; GFC_REAL_8 *dest; index_type rank; @@ -55,6 +55,9 @@ sum_r8 (gfc_array_r8 *retarray, gfc_array_r8 *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; @@ -172,11 +175,11 @@ void msum_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array, index_type *pdim, gfc_array_l4 * mask) { - index_type count[GFC_MAX_DIMENSIONS - 1]; - index_type extent[GFC_MAX_DIMENSIONS - 1]; - index_type sstride[GFC_MAX_DIMENSIONS - 1]; - index_type dstride[GFC_MAX_DIMENSIONS - 1]; - index_type mstride[GFC_MAX_DIMENSIONS - 1]; + index_type count[GFC_MAX_DIMENSIONS]; + index_type extent[GFC_MAX_DIMENSIONS]; + index_type sstride[GFC_MAX_DIMENSIONS]; + index_type dstride[GFC_MAX_DIMENSIONS]; + index_type mstride[GFC_MAX_DIMENSIONS]; GFC_REAL_8 *dest; GFC_REAL_8 *base; GFC_LOGICAL_4 *mbase; @@ -189,6 +192,9 @@ msum_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array, 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; |