diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2018-01-15 18:35:13 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2018-01-15 18:35:13 +0000 |
commit | 64b1806b2d94fd325759761b64fb7507ca83d5d2 (patch) | |
tree | e14d0d04d69a89aa4bda7faa882d36121d76f08b /libgfortran/generated | |
parent | 650d669bb4a74cd2cc17d80b110d0f666d3f5bee (diff) | |
download | gcc-64b1806b2d94fd325759761b64fb7507ca83d5d2.zip gcc-64b1806b2d94fd325759761b64fb7507ca83d5d2.tar.gz gcc-64b1806b2d94fd325759761b64fb7507ca83d5d2.tar.bz2 |
re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=)
2018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/54613
* gfortran.h (gfc_check_f): Rename f4ml to f5ml.
(gfc_logical_4_kind): New macro
* intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
(gfc_simplify_maxloc): Likewise.
(gfc_resolve_maxloc): Likewise.
(gfc_resolve_minloc): Likewise.
* check.c (gfc_check_minloc_maxloc): Add checking for "back"
argument; also raise error if it is used (for now). Add it
if it isn't present.
* intrinsic.c (add_sym_4ml): Rename to
(add_sym_5ml), adjust for extra argument.
(add_functions): Add "back" constant. Adjust maxloc and minloc
for back argument.
* iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
not of gfc_logical_4_kind, convert.
(gfc_resolve_minloc): Likewise.
* simplify.c (gfc_simplify_minloc): Add back argument.
(gfc_simplify_maxloc): Likewise.
* trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
argument to %VAL to ensure passing by value.
(gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
also for library calls.
2018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/54613
* m4/iparm.m4: Add back_arg macro if in minloc or maxloc.
* m4/iforeach-s.m4: Add optional argument back with back_arg
macro. Improve m4 quoting. If HAVE_BACK_ARG is defined, assert
that back is non-true.
* m4/iforeach.m4: Likewise.
* m4/ifunction-s.m4: Likewise.
* m4/ifunction.m4: Likewise.
* m4/maxloc0.m4: Include assert.h
* m4/minloc0.m4: Likewise.
* m4/maxloc0s.m4: #define HAVE_BACK_ARG.
* m4/minloc0s.m4: Likewise.
* m4/maxloc1s.m4: Likewise.
* m4/minloc1s.m4: Likewise.
* m4/maxloc1.m4: Include assert.h, #define HAVE_BACK_ARG.
* m4/minloc1.m4: Likewise.
* m4/maxloc2s.m4: Add assert.h, add back_arg, assert that
back is non-true.
* m4/minloc2s.m4: Likewise.
* generated/iall_i1.c: Regenerated.
* generated/iall_i16.c: Regenerated.
* generated/iall_i2.c: Regenerated.
* generated/iall_i4.c: Regenerated.
* generated/iall_i8.c: Regenerated.
* generated/iany_i1.c: Regenerated.
* generated/iany_i16.c: Regenerated.
* generated/iany_i2.c: Regenerated.
* generated/iany_i4.c: Regenerated.
* generated/iany_i8.c: Regenerated.
* generated/iparity_i1.c: Regenerated.
* generated/iparity_i16.c: Regenerated.
* generated/iparity_i2.c: Regenerated.
* generated/iparity_i4.c: Regenerated.
* generated/iparity_i8.c: Regenerated.
* generated/maxloc0_16_i1.c: Regenerated.
* generated/maxloc0_16_i16.c: Regenerated.
* generated/maxloc0_16_i2.c: Regenerated.
* generated/maxloc0_16_i4.c: Regenerated.
* generated/maxloc0_16_i8.c: Regenerated.
* generated/maxloc0_16_r10.c: Regenerated.
* generated/maxloc0_16_r16.c: Regenerated.
* generated/maxloc0_16_r4.c: Regenerated.
* generated/maxloc0_16_r8.c: Regenerated.
* generated/maxloc0_16_s1.c: Regenerated.
* generated/maxloc0_16_s4.c: Regenerated.
* generated/maxloc0_4_i1.c: Regenerated.
* generated/maxloc0_4_i16.c: Regenerated.
* generated/maxloc0_4_i2.c: Regenerated.
* generated/maxloc0_4_i4.c: Regenerated.
* generated/maxloc0_4_i8.c: Regenerated.
* generated/maxloc0_4_r10.c: Regenerated.
* generated/maxloc0_4_r16.c: Regenerated.
* generated/maxloc0_4_r4.c: Regenerated.
* generated/maxloc0_4_r8.c: Regenerated.
* generated/maxloc0_4_s1.c: Regenerated.
* generated/maxloc0_4_s4.c: Regenerated.
* generated/maxloc0_8_i1.c: Regenerated.
* generated/maxloc0_8_i16.c: Regenerated.
* generated/maxloc0_8_i2.c: Regenerated.
* generated/maxloc0_8_i4.c: Regenerated.
* generated/maxloc0_8_i8.c: Regenerated.
* generated/maxloc0_8_r10.c: Regenerated.
* generated/maxloc0_8_r16.c: Regenerated.
* generated/maxloc0_8_r4.c: Regenerated.
* generated/maxloc0_8_r8.c: Regenerated.
* generated/maxloc0_8_s1.c: Regenerated.
* generated/maxloc0_8_s4.c: Regenerated.
* generated/maxloc1_16_i1.c: Regenerated.
* generated/maxloc1_16_i16.c: Regenerated.
* generated/maxloc1_16_i2.c: Regenerated.
* generated/maxloc1_16_i4.c: Regenerated.
* generated/maxloc1_16_i8.c: Regenerated.
* generated/maxloc1_16_r10.c: Regenerated.
* generated/maxloc1_16_r16.c: Regenerated.
* generated/maxloc1_16_r4.c: Regenerated.
* generated/maxloc1_16_r8.c: Regenerated.
* generated/maxloc1_16_s1.c: Regenerated.
* generated/maxloc1_16_s4.c: Regenerated.
* generated/maxloc1_4_i1.c: Regenerated.
* generated/maxloc1_4_i16.c: Regenerated.
* generated/maxloc1_4_i2.c: Regenerated.
* generated/maxloc1_4_i4.c: Regenerated.
* generated/maxloc1_4_i8.c: Regenerated.
* generated/maxloc1_4_r10.c: Regenerated.
* generated/maxloc1_4_r16.c: Regenerated.
* generated/maxloc1_4_r4.c: Regenerated.
* generated/maxloc1_4_r8.c: Regenerated.
* generated/maxloc1_4_s1.c: Regenerated.
* generated/maxloc1_4_s4.c: Regenerated.
* generated/maxloc1_8_i1.c: Regenerated.
* generated/maxloc1_8_i16.c: Regenerated.
* generated/maxloc1_8_i2.c: Regenerated.
* generated/maxloc1_8_i4.c: Regenerated.
* generated/maxloc1_8_i8.c: Regenerated.
* generated/maxloc1_8_r10.c: Regenerated.
* generated/maxloc1_8_r16.c: Regenerated.
* generated/maxloc1_8_r4.c: Regenerated.
* generated/maxloc1_8_r8.c: Regenerated.
* generated/maxloc1_8_s1.c: Regenerated.
* generated/maxloc1_8_s4.c: Regenerated.
* generated/maxval_i1.c: Regenerated.
* generated/maxval_i16.c: Regenerated.
* generated/maxval_i2.c: Regenerated.
* generated/maxval_i4.c: Regenerated.
* generated/maxval_i8.c: Regenerated.
* generated/maxval_r10.c: Regenerated.
* generated/maxval_r16.c: Regenerated.
* generated/maxval_r4.c: Regenerated.
* generated/maxval_r8.c: Regenerated.
* generated/minloc0_16_i1.c: Regenerated.
* generated/minloc0_16_i16.c: Regenerated.
* generated/minloc0_16_i2.c: Regenerated.
* generated/minloc0_16_i4.c: Regenerated.
* generated/minloc0_16_i8.c: Regenerated.
* generated/minloc0_16_r10.c: Regenerated.
* generated/minloc0_16_r16.c: Regenerated.
* generated/minloc0_16_r4.c: Regenerated.
* generated/minloc0_16_r8.c: Regenerated.
* generated/minloc0_16_s1.c: Regenerated.
* generated/minloc0_16_s4.c: Regenerated.
* generated/minloc0_4_i1.c: Regenerated.
* generated/minloc0_4_i16.c: Regenerated.
* generated/minloc0_4_i2.c: Regenerated.
* generated/minloc0_4_i4.c: Regenerated.
* generated/minloc0_4_i8.c: Regenerated.
* generated/minloc0_4_r10.c: Regenerated.
* generated/minloc0_4_r16.c: Regenerated.
* generated/minloc0_4_r4.c: Regenerated.
* generated/minloc0_4_r8.c: Regenerated.
* generated/minloc0_4_s1.c: Regenerated.
* generated/minloc0_4_s4.c: Regenerated.
* generated/minloc0_8_i1.c: Regenerated.
* generated/minloc0_8_i16.c: Regenerated.
* generated/minloc0_8_i2.c: Regenerated.
* generated/minloc0_8_i4.c: Regenerated.
* generated/minloc0_8_i8.c: Regenerated.
* generated/minloc0_8_r10.c: Regenerated.
* generated/minloc0_8_r16.c: Regenerated.
* generated/minloc0_8_r4.c: Regenerated.
* generated/minloc0_8_r8.c: Regenerated.
* generated/minloc0_8_s1.c: Regenerated.
* generated/minloc0_8_s4.c: Regenerated.
* generated/minloc1_16_i1.c: Regenerated.
* generated/minloc1_16_i16.c: Regenerated.
* generated/minloc1_16_i2.c: Regenerated.
* generated/minloc1_16_i4.c: Regenerated.
* generated/minloc1_16_i8.c: Regenerated.
* generated/minloc1_16_r10.c: Regenerated.
* generated/minloc1_16_r16.c: Regenerated.
* generated/minloc1_16_r4.c: Regenerated.
* generated/minloc1_16_r8.c: Regenerated.
* generated/minloc1_16_s1.c: Regenerated.
* generated/minloc1_16_s4.c: Regenerated.
* generated/minloc1_4_i1.c: Regenerated.
* generated/minloc1_4_i16.c: Regenerated.
* generated/minloc1_4_i2.c: Regenerated.
* generated/minloc1_4_i4.c: Regenerated.
* generated/minloc1_4_i8.c: Regenerated.
* generated/minloc1_4_r10.c: Regenerated.
* generated/minloc1_4_r16.c: Regenerated.
* generated/minloc1_4_r4.c: Regenerated.
* generated/minloc1_4_r8.c: Regenerated.
* generated/minloc1_4_s1.c: Regenerated.
* generated/minloc1_4_s4.c: Regenerated.
* generated/minloc1_8_i1.c: Regenerated.
* generated/minloc1_8_i16.c: Regenerated.
* generated/minloc1_8_i2.c: Regenerated.
* generated/minloc1_8_i4.c: Regenerated.
* generated/minloc1_8_i8.c: Regenerated.
* generated/minloc1_8_r10.c: Regenerated.
* generated/minloc1_8_r16.c: Regenerated.
* generated/minloc1_8_r4.c: Regenerated.
* generated/minloc1_8_r8.c: Regenerated.
* generated/minloc1_8_s1.c: Regenerated.
* generated/minloc1_8_s4.c: Regenerated.
* generated/minval_i1.c: Regenerated.
* generated/minval_i16.c: Regenerated.
* generated/minval_i2.c: Regenerated.
* generated/minval_i4.c: Regenerated.
* generated/minval_i8.c: Regenerated.
* generated/minval_r10.c: Regenerated.
* generated/minval_r16.c: Regenerated.
* generated/minval_r4.c: Regenerated.
* generated/minval_r8.c: Regenerated.
* generated/norm2_r10.c: Regenerated.
* generated/norm2_r16.c: Regenerated.
* generated/norm2_r4.c: Regenerated.
* generated/norm2_r8.c: Regenerated.
* generated/parity_l1.c: Regenerated.
* generated/parity_l16.c: Regenerated.
* generated/parity_l2.c: Regenerated.
* generated/parity_l4.c: Regenerated.
* generated/parity_l8.c: Regenerated.
* generated/product_c10.c: Regenerated.
* generated/product_c16.c: Regenerated.
* generated/product_c4.c: Regenerated.
* generated/product_c8.c: Regenerated.
* generated/product_i1.c: Regenerated.
* generated/product_i16.c: Regenerated.
* generated/product_i2.c: Regenerated.
* generated/product_i4.c: Regenerated.
* generated/product_i8.c: Regenerated.
* generated/product_r10.c: Regenerated.
* generated/product_r16.c: Regenerated.
* generated/product_r4.c: Regenerated.
* generated/product_r8.c: Regenerated.
* generated/sum_c10.c: Regenerated.
* generated/sum_c16.c: Regenerated.
* generated/sum_c4.c: Regenerated.
* generated/sum_c8.c: Regenerated.
* generated/sum_i1.c: Regenerated.
* generated/sum_i16.c: Regenerated.
* generated/sum_i2.c: Regenerated.
* generated/sum_i4.c: Regenerated.
* generated/sum_i8.c: Regenerated.
* generated/sum_r10.c: Regenerated.
* generated/sum_r16.c: Regenerated.
* generated/sum_r4.c: Regenerated.
* generated/sum_r8.c: Regenerated.
2018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/54613
* gfortran.dg/minmaxloc_9.f90: New test.
* gfortran.dg/minmaxloc_10.f90: New test.
* gfortran.dg/minmaxloc_11.f90: New test.
From-SVN: r256705
Diffstat (limited to 'libgfortran/generated')
212 files changed, 3049 insertions, 930 deletions
diff --git a/libgfortran/generated/iall_i1.c b/libgfortran/generated/iall_i1.c index bf13b79..a171ed2 100644 --- a/libgfortran/generated/iall_i1.c +++ b/libgfortran/generated/iall_i1.c @@ -51,6 +51,10 @@ iall_i1 (gfc_array_i1 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ miall_i1 (gfc_array_i1 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ siall_i1 (gfc_array_i1 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + iall_i1 (retarray, array, pdim, back); +#else iall_i1 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/iall_i16.c b/libgfortran/generated/iall_i16.c index a3de245..80c89e8 100644 --- a/libgfortran/generated/iall_i16.c +++ b/libgfortran/generated/iall_i16.c @@ -51,6 +51,10 @@ iall_i16 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ miall_i16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ siall_i16 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + iall_i16 (retarray, array, pdim, back); +#else iall_i16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/iall_i2.c b/libgfortran/generated/iall_i2.c index b2b3f05..618b024 100644 --- a/libgfortran/generated/iall_i2.c +++ b/libgfortran/generated/iall_i2.c @@ -51,6 +51,10 @@ iall_i2 (gfc_array_i2 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ miall_i2 (gfc_array_i2 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ siall_i2 (gfc_array_i2 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + iall_i2 (retarray, array, pdim, back); +#else iall_i2 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/iall_i4.c b/libgfortran/generated/iall_i4.c index 70a4379..808e073 100644 --- a/libgfortran/generated/iall_i4.c +++ b/libgfortran/generated/iall_i4.c @@ -51,6 +51,10 @@ iall_i4 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ miall_i4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ siall_i4 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + iall_i4 (retarray, array, pdim, back); +#else iall_i4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/iall_i8.c b/libgfortran/generated/iall_i8.c index 77cc4c0..c487b6c 100644 --- a/libgfortran/generated/iall_i8.c +++ b/libgfortran/generated/iall_i8.c @@ -51,6 +51,10 @@ iall_i8 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ miall_i8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ siall_i8 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + iall_i8 (retarray, array, pdim, back); +#else iall_i8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/iany_i1.c b/libgfortran/generated/iany_i1.c index 9673cb0..0890eed 100644 --- a/libgfortran/generated/iany_i1.c +++ b/libgfortran/generated/iany_i1.c @@ -51,6 +51,10 @@ iany_i1 (gfc_array_i1 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ miany_i1 (gfc_array_i1 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ siany_i1 (gfc_array_i1 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + iany_i1 (retarray, array, pdim, back); +#else iany_i1 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/iany_i16.c b/libgfortran/generated/iany_i16.c index df60f10..126db33 100644 --- a/libgfortran/generated/iany_i16.c +++ b/libgfortran/generated/iany_i16.c @@ -51,6 +51,10 @@ iany_i16 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ miany_i16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ siany_i16 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + iany_i16 (retarray, array, pdim, back); +#else iany_i16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/iany_i2.c b/libgfortran/generated/iany_i2.c index 5b0623bd..3a26b2c 100644 --- a/libgfortran/generated/iany_i2.c +++ b/libgfortran/generated/iany_i2.c @@ -51,6 +51,10 @@ iany_i2 (gfc_array_i2 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ miany_i2 (gfc_array_i2 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ siany_i2 (gfc_array_i2 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + iany_i2 (retarray, array, pdim, back); +#else iany_i2 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/iany_i4.c b/libgfortran/generated/iany_i4.c index a7effd6..8b81d00 100644 --- a/libgfortran/generated/iany_i4.c +++ b/libgfortran/generated/iany_i4.c @@ -51,6 +51,10 @@ iany_i4 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ miany_i4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ siany_i4 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + iany_i4 (retarray, array, pdim, back); +#else iany_i4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/iany_i8.c b/libgfortran/generated/iany_i8.c index c87ba7a..9ffc9b6 100644 --- a/libgfortran/generated/iany_i8.c +++ b/libgfortran/generated/iany_i8.c @@ -51,6 +51,10 @@ iany_i8 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ miany_i8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ siany_i8 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + iany_i8 (retarray, array, pdim, back); +#else iany_i8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/iparity_i1.c b/libgfortran/generated/iparity_i1.c index 4315406..b4d42402 100644 --- a/libgfortran/generated/iparity_i1.c +++ b/libgfortran/generated/iparity_i1.c @@ -51,6 +51,10 @@ iparity_i1 (gfc_array_i1 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ miparity_i1 (gfc_array_i1 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ siparity_i1 (gfc_array_i1 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + iparity_i1 (retarray, array, pdim, back); +#else iparity_i1 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/iparity_i16.c b/libgfortran/generated/iparity_i16.c index 8817487..96cb108 100644 --- a/libgfortran/generated/iparity_i16.c +++ b/libgfortran/generated/iparity_i16.c @@ -51,6 +51,10 @@ iparity_i16 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ miparity_i16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ siparity_i16 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + iparity_i16 (retarray, array, pdim, back); +#else iparity_i16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/iparity_i2.c b/libgfortran/generated/iparity_i2.c index 0c73703..b077f29 100644 --- a/libgfortran/generated/iparity_i2.c +++ b/libgfortran/generated/iparity_i2.c @@ -51,6 +51,10 @@ iparity_i2 (gfc_array_i2 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ miparity_i2 (gfc_array_i2 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ siparity_i2 (gfc_array_i2 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + iparity_i2 (retarray, array, pdim, back); +#else iparity_i2 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/iparity_i4.c b/libgfortran/generated/iparity_i4.c index 1f1bfa9..1b5dfe0 100644 --- a/libgfortran/generated/iparity_i4.c +++ b/libgfortran/generated/iparity_i4.c @@ -51,6 +51,10 @@ iparity_i4 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ miparity_i4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ siparity_i4 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + iparity_i4 (retarray, array, pdim, back); +#else iparity_i4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/iparity_i8.c b/libgfortran/generated/iparity_i8.c index ad58b53..056a59b 100644 --- a/libgfortran/generated/iparity_i8.c +++ b/libgfortran/generated/iparity_i8.c @@ -51,6 +51,10 @@ iparity_i8 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ miparity_i8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ siparity_i8 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + iparity_i8 (retarray, array, pdim, back); +#else iparity_i8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc0_16_i1.c b/libgfortran/generated/maxloc0_16_i1.c index aa5ac36..25398cc 100644 --- a/libgfortran/generated/maxloc0_16_i1.c +++ b/libgfortran/generated/maxloc0_16_i1.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_16) extern void maxloc0_16_i1 (gfc_array_i16 * const restrict retarray, - gfc_array_i1 * const restrict array); + gfc_array_i1 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_16_i1); void maxloc0_16_i1 (gfc_array_i16 * const restrict retarray, - gfc_array_i1 * const restrict array) + gfc_array_i1 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_16_i1 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_16_i1 (gfc_array_i16 * const restrict retarray, extern void mmaxloc0_16_i1 (gfc_array_i16 * const restrict, - gfc_array_i1 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i1 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_16_i1); void mmaxloc0_16_i1 (gfc_array_i16 * const restrict retarray, gfc_array_i1 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_16_i1 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_16_i1 (gfc_array_i16 * const restrict retarray, extern void smaxloc0_16_i1 (gfc_array_i16 * const restrict, - gfc_array_i1 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i1 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_16_i1); void smaxloc0_16_i1 (gfc_array_i16 * const restrict retarray, gfc_array_i1 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_16_i1 (gfc_array_i16 * const restrict retarray, if (*mask) { - maxloc0_16_i1 (retarray, array); + maxloc0_16_i1 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_16_i16.c b/libgfortran/generated/maxloc0_16_i16.c index f648402..3a4a744 100644 --- a/libgfortran/generated/maxloc0_16_i16.c +++ b/libgfortran/generated/maxloc0_16_i16.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_INTEGER_16) extern void maxloc0_16_i16 (gfc_array_i16 * const restrict retarray, - gfc_array_i16 * const restrict array); + gfc_array_i16 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_16_i16); void maxloc0_16_i16 (gfc_array_i16 * const restrict retarray, - gfc_array_i16 * const restrict array) + gfc_array_i16 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_16_i16 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_16_i16 (gfc_array_i16 * const restrict retarray, extern void mmaxloc0_16_i16 (gfc_array_i16 * const restrict, - gfc_array_i16 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i16 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_16_i16); void mmaxloc0_16_i16 (gfc_array_i16 * const restrict retarray, gfc_array_i16 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_16_i16 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_16_i16 (gfc_array_i16 * const restrict retarray, extern void smaxloc0_16_i16 (gfc_array_i16 * const restrict, - gfc_array_i16 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i16 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_16_i16); void smaxloc0_16_i16 (gfc_array_i16 * const restrict retarray, gfc_array_i16 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_16_i16 (gfc_array_i16 * const restrict retarray, if (*mask) { - maxloc0_16_i16 (retarray, array); + maxloc0_16_i16 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_16_i2.c b/libgfortran/generated/maxloc0_16_i2.c index 825eb74..0ff8ca0 100644 --- a/libgfortran/generated/maxloc0_16_i2.c +++ b/libgfortran/generated/maxloc0_16_i2.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_2) && defined (HAVE_GFC_INTEGER_16) extern void maxloc0_16_i2 (gfc_array_i16 * const restrict retarray, - gfc_array_i2 * const restrict array); + gfc_array_i2 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_16_i2); void maxloc0_16_i2 (gfc_array_i16 * const restrict retarray, - gfc_array_i2 * const restrict array) + gfc_array_i2 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_16_i2 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_16_i2 (gfc_array_i16 * const restrict retarray, extern void mmaxloc0_16_i2 (gfc_array_i16 * const restrict, - gfc_array_i2 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i2 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_16_i2); void mmaxloc0_16_i2 (gfc_array_i16 * const restrict retarray, gfc_array_i2 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_16_i2 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_16_i2 (gfc_array_i16 * const restrict retarray, extern void smaxloc0_16_i2 (gfc_array_i16 * const restrict, - gfc_array_i2 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i2 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_16_i2); void smaxloc0_16_i2 (gfc_array_i16 * const restrict retarray, gfc_array_i2 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_16_i2 (gfc_array_i16 * const restrict retarray, if (*mask) { - maxloc0_16_i2 (retarray, array); + maxloc0_16_i2 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_16_i4.c b/libgfortran/generated/maxloc0_16_i4.c index 0720609..84cff67 100644 --- a/libgfortran/generated/maxloc0_16_i4.c +++ b/libgfortran/generated/maxloc0_16_i4.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_16) extern void maxloc0_16_i4 (gfc_array_i16 * const restrict retarray, - gfc_array_i4 * const restrict array); + gfc_array_i4 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_16_i4); void maxloc0_16_i4 (gfc_array_i16 * const restrict retarray, - gfc_array_i4 * const restrict array) + gfc_array_i4 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_16_i4 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_16_i4 (gfc_array_i16 * const restrict retarray, extern void mmaxloc0_16_i4 (gfc_array_i16 * const restrict, - gfc_array_i4 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i4 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_16_i4); void mmaxloc0_16_i4 (gfc_array_i16 * const restrict retarray, gfc_array_i4 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_16_i4 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_16_i4 (gfc_array_i16 * const restrict retarray, extern void smaxloc0_16_i4 (gfc_array_i16 * const restrict, - gfc_array_i4 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i4 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_16_i4); void smaxloc0_16_i4 (gfc_array_i16 * const restrict retarray, gfc_array_i4 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_16_i4 (gfc_array_i16 * const restrict retarray, if (*mask) { - maxloc0_16_i4 (retarray, array); + maxloc0_16_i4 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_16_i8.c b/libgfortran/generated/maxloc0_16_i8.c index f5318e9..e276295 100644 --- a/libgfortran/generated/maxloc0_16_i8.c +++ b/libgfortran/generated/maxloc0_16_i8.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_INTEGER_16) extern void maxloc0_16_i8 (gfc_array_i16 * const restrict retarray, - gfc_array_i8 * const restrict array); + gfc_array_i8 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_16_i8); void maxloc0_16_i8 (gfc_array_i16 * const restrict retarray, - gfc_array_i8 * const restrict array) + gfc_array_i8 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_16_i8 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_16_i8 (gfc_array_i16 * const restrict retarray, extern void mmaxloc0_16_i8 (gfc_array_i16 * const restrict, - gfc_array_i8 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i8 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_16_i8); void mmaxloc0_16_i8 (gfc_array_i16 * const restrict retarray, gfc_array_i8 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_16_i8 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_16_i8 (gfc_array_i16 * const restrict retarray, extern void smaxloc0_16_i8 (gfc_array_i16 * const restrict, - gfc_array_i8 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i8 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_16_i8); void smaxloc0_16_i8 (gfc_array_i16 * const restrict retarray, gfc_array_i8 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_16_i8 (gfc_array_i16 * const restrict retarray, if (*mask) { - maxloc0_16_i8 (retarray, array); + maxloc0_16_i8 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_16_r10.c b/libgfortran/generated/maxloc0_16_r10.c index 1641b3a..384487f 100644 --- a/libgfortran/generated/maxloc0_16_r10.c +++ b/libgfortran/generated/maxloc0_16_r10.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_10) && defined (HAVE_GFC_INTEGER_16) extern void maxloc0_16_r10 (gfc_array_i16 * const restrict retarray, - gfc_array_r10 * const restrict array); + gfc_array_r10 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_16_r10); void maxloc0_16_r10 (gfc_array_i16 * const restrict retarray, - gfc_array_r10 * const restrict array) + gfc_array_r10 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_16_r10 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_16_r10 (gfc_array_i16 * const restrict retarray, extern void mmaxloc0_16_r10 (gfc_array_i16 * const restrict, - gfc_array_r10 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r10 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_16_r10); void mmaxloc0_16_r10 (gfc_array_i16 * const restrict retarray, gfc_array_r10 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_16_r10 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_16_r10 (gfc_array_i16 * const restrict retarray, extern void smaxloc0_16_r10 (gfc_array_i16 * const restrict, - gfc_array_r10 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r10 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_16_r10); void smaxloc0_16_r10 (gfc_array_i16 * const restrict retarray, gfc_array_r10 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_16_r10 (gfc_array_i16 * const restrict retarray, if (*mask) { - maxloc0_16_r10 (retarray, array); + maxloc0_16_r10 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_16_r16.c b/libgfortran/generated/maxloc0_16_r16.c index c5409fd..10c7673 100644 --- a/libgfortran/generated/maxloc0_16_r16.c +++ b/libgfortran/generated/maxloc0_16_r16.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_16) && defined (HAVE_GFC_INTEGER_16) extern void maxloc0_16_r16 (gfc_array_i16 * const restrict retarray, - gfc_array_r16 * const restrict array); + gfc_array_r16 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_16_r16); void maxloc0_16_r16 (gfc_array_i16 * const restrict retarray, - gfc_array_r16 * const restrict array) + gfc_array_r16 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_16_r16 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_16_r16 (gfc_array_i16 * const restrict retarray, extern void mmaxloc0_16_r16 (gfc_array_i16 * const restrict, - gfc_array_r16 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r16 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_16_r16); void mmaxloc0_16_r16 (gfc_array_i16 * const restrict retarray, gfc_array_r16 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_16_r16 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_16_r16 (gfc_array_i16 * const restrict retarray, extern void smaxloc0_16_r16 (gfc_array_i16 * const restrict, - gfc_array_r16 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r16 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_16_r16); void smaxloc0_16_r16 (gfc_array_i16 * const restrict retarray, gfc_array_r16 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_16_r16 (gfc_array_i16 * const restrict retarray, if (*mask) { - maxloc0_16_r16 (retarray, array); + maxloc0_16_r16 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_16_r4.c b/libgfortran/generated/maxloc0_16_r4.c index 1d076a1..b7aaa3d 100644 --- a/libgfortran/generated/maxloc0_16_r4.c +++ b/libgfortran/generated/maxloc0_16_r4.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_4) && defined (HAVE_GFC_INTEGER_16) extern void maxloc0_16_r4 (gfc_array_i16 * const restrict retarray, - gfc_array_r4 * const restrict array); + gfc_array_r4 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_16_r4); void maxloc0_16_r4 (gfc_array_i16 * const restrict retarray, - gfc_array_r4 * const restrict array) + gfc_array_r4 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_16_r4 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_16_r4 (gfc_array_i16 * const restrict retarray, extern void mmaxloc0_16_r4 (gfc_array_i16 * const restrict, - gfc_array_r4 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r4 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_16_r4); void mmaxloc0_16_r4 (gfc_array_i16 * const restrict retarray, gfc_array_r4 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_16_r4 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_16_r4 (gfc_array_i16 * const restrict retarray, extern void smaxloc0_16_r4 (gfc_array_i16 * const restrict, - gfc_array_r4 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r4 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_16_r4); void smaxloc0_16_r4 (gfc_array_i16 * const restrict retarray, gfc_array_r4 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_16_r4 (gfc_array_i16 * const restrict retarray, if (*mask) { - maxloc0_16_r4 (retarray, array); + maxloc0_16_r4 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_16_r8.c b/libgfortran/generated/maxloc0_16_r8.c index 2cb175b..2ca3479 100644 --- a/libgfortran/generated/maxloc0_16_r8.c +++ b/libgfortran/generated/maxloc0_16_r8.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_8) && defined (HAVE_GFC_INTEGER_16) extern void maxloc0_16_r8 (gfc_array_i16 * const restrict retarray, - gfc_array_r8 * const restrict array); + gfc_array_r8 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_16_r8); void maxloc0_16_r8 (gfc_array_i16 * const restrict retarray, - gfc_array_r8 * const restrict array) + gfc_array_r8 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_16_r8 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_16_r8 (gfc_array_i16 * const restrict retarray, extern void mmaxloc0_16_r8 (gfc_array_i16 * const restrict, - gfc_array_r8 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r8 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_16_r8); void mmaxloc0_16_r8 (gfc_array_i16 * const restrict retarray, gfc_array_r8 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_16_r8 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_16_r8 (gfc_array_i16 * const restrict retarray, extern void smaxloc0_16_r8 (gfc_array_i16 * const restrict, - gfc_array_r8 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r8 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_16_r8); void smaxloc0_16_r8 (gfc_array_i16 * const restrict retarray, gfc_array_r8 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_16_r8 (gfc_array_i16 * const restrict retarray, if (*mask) { - maxloc0_16_r8 (retarray, array); + maxloc0_16_r8 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_16_s1.c b/libgfortran/generated/maxloc0_16_s1.c index 424237c..a05d178 100644 --- a/libgfortran/generated/maxloc0_16_s1.c +++ b/libgfortran/generated/maxloc0_16_s1.c @@ -32,6 +32,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + static inline int compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) { @@ -43,12 +45,12 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) } extern void maxloc0_16_s1 (gfc_array_i16 * const restrict retarray, - gfc_array_s1 * const restrict array, gfc_charlen_type len); + gfc_array_s1 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len); export_proto(maxloc0_16_s1); void maxloc0_16_s1 (gfc_array_i16 * const restrict retarray, - gfc_array_s1 * const restrict array, gfc_charlen_type len) + gfc_array_s1 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -59,6 +61,10 @@ maxloc0_16_s1 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -149,13 +155,15 @@ maxloc0_16_s1 (gfc_array_i16 * const restrict retarray, extern void mmaxloc0_16_s1 (gfc_array_i16 * const restrict, - gfc_array_s1 * const restrict, gfc_array_l1 * const restrict, gfc_charlen_type len); + gfc_array_s1 * const restrict, gfc_array_l1 * const restrict , GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(mmaxloc0_16_s1); void mmaxloc0_16_s1 (gfc_array_i16 * const restrict retarray, gfc_array_s1 * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -169,6 +177,9 @@ mmaxloc0_16_s1 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -282,13 +293,15 @@ mmaxloc0_16_s1 (gfc_array_i16 * const restrict retarray, extern void smaxloc0_16_s1 (gfc_array_i16 * const restrict, - gfc_array_s1 * const restrict, GFC_LOGICAL_4 *, gfc_charlen_type len); + gfc_array_s1 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(smaxloc0_16_s1); void smaxloc0_16_s1 (gfc_array_i16 * const restrict retarray, gfc_array_s1 * const restrict array, - GFC_LOGICAL_4 * mask, gfc_charlen_type len) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type rank; index_type dstride; @@ -297,7 +310,11 @@ smaxloc0_16_s1 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc0_16_s1 (retarray, array, back, len); +#else maxloc0_16_s1 (retarray, array, len); +#endif return; } diff --git a/libgfortran/generated/maxloc0_16_s4.c b/libgfortran/generated/maxloc0_16_s4.c index e0c236a..f6adf95 100644 --- a/libgfortran/generated/maxloc0_16_s4.c +++ b/libgfortran/generated/maxloc0_16_s4.c @@ -32,6 +32,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + static inline int compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) { @@ -43,12 +45,12 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) } extern void maxloc0_16_s4 (gfc_array_i16 * const restrict retarray, - gfc_array_s4 * const restrict array, gfc_charlen_type len); + gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len); export_proto(maxloc0_16_s4); void maxloc0_16_s4 (gfc_array_i16 * const restrict retarray, - gfc_array_s4 * const restrict array, gfc_charlen_type len) + gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -59,6 +61,10 @@ maxloc0_16_s4 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -149,13 +155,15 @@ maxloc0_16_s4 (gfc_array_i16 * const restrict retarray, extern void mmaxloc0_16_s4 (gfc_array_i16 * const restrict, - gfc_array_s4 * const restrict, gfc_array_l1 * const restrict, gfc_charlen_type len); + gfc_array_s4 * const restrict, gfc_array_l1 * const restrict , GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(mmaxloc0_16_s4); void mmaxloc0_16_s4 (gfc_array_i16 * const restrict retarray, gfc_array_s4 * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -169,6 +177,9 @@ mmaxloc0_16_s4 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -282,13 +293,15 @@ mmaxloc0_16_s4 (gfc_array_i16 * const restrict retarray, extern void smaxloc0_16_s4 (gfc_array_i16 * const restrict, - gfc_array_s4 * const restrict, GFC_LOGICAL_4 *, gfc_charlen_type len); + gfc_array_s4 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(smaxloc0_16_s4); void smaxloc0_16_s4 (gfc_array_i16 * const restrict retarray, gfc_array_s4 * const restrict array, - GFC_LOGICAL_4 * mask, gfc_charlen_type len) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type rank; index_type dstride; @@ -297,7 +310,11 @@ smaxloc0_16_s4 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc0_16_s4 (retarray, array, back, len); +#else maxloc0_16_s4 (retarray, array, len); +#endif return; } diff --git a/libgfortran/generated/maxloc0_4_i1.c b/libgfortran/generated/maxloc0_4_i1.c index 137e852..dc31e1d 100644 --- a/libgfortran/generated/maxloc0_4_i1.c +++ b/libgfortran/generated/maxloc0_4_i1.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_4) extern void maxloc0_4_i1 (gfc_array_i4 * const restrict retarray, - gfc_array_i1 * const restrict array); + gfc_array_i1 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_4_i1); void maxloc0_4_i1 (gfc_array_i4 * const restrict retarray, - gfc_array_i1 * const restrict array) + gfc_array_i1 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_4_i1 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_4_i1 (gfc_array_i4 * const restrict retarray, extern void mmaxloc0_4_i1 (gfc_array_i4 * const restrict, - gfc_array_i1 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i1 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_4_i1); void mmaxloc0_4_i1 (gfc_array_i4 * const restrict retarray, gfc_array_i1 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_4_i1 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_4_i1 (gfc_array_i4 * const restrict retarray, extern void smaxloc0_4_i1 (gfc_array_i4 * const restrict, - gfc_array_i1 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i1 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_4_i1); void smaxloc0_4_i1 (gfc_array_i4 * const restrict retarray, gfc_array_i1 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_4_i1 (gfc_array_i4 * const restrict retarray, if (*mask) { - maxloc0_4_i1 (retarray, array); + maxloc0_4_i1 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_4_i16.c b/libgfortran/generated/maxloc0_4_i16.c index 880e3ca..f722600 100644 --- a/libgfortran/generated/maxloc0_4_i16.c +++ b/libgfortran/generated/maxloc0_4_i16.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_INTEGER_4) extern void maxloc0_4_i16 (gfc_array_i4 * const restrict retarray, - gfc_array_i16 * const restrict array); + gfc_array_i16 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_4_i16); void maxloc0_4_i16 (gfc_array_i4 * const restrict retarray, - gfc_array_i16 * const restrict array) + gfc_array_i16 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_4_i16 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_4_i16 (gfc_array_i4 * const restrict retarray, extern void mmaxloc0_4_i16 (gfc_array_i4 * const restrict, - gfc_array_i16 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i16 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_4_i16); void mmaxloc0_4_i16 (gfc_array_i4 * const restrict retarray, gfc_array_i16 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_4_i16 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_4_i16 (gfc_array_i4 * const restrict retarray, extern void smaxloc0_4_i16 (gfc_array_i4 * const restrict, - gfc_array_i16 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i16 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_4_i16); void smaxloc0_4_i16 (gfc_array_i4 * const restrict retarray, gfc_array_i16 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_4_i16 (gfc_array_i4 * const restrict retarray, if (*mask) { - maxloc0_4_i16 (retarray, array); + maxloc0_4_i16 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_4_i2.c b/libgfortran/generated/maxloc0_4_i2.c index 98197ec..f78e20ec 100644 --- a/libgfortran/generated/maxloc0_4_i2.c +++ b/libgfortran/generated/maxloc0_4_i2.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_2) && defined (HAVE_GFC_INTEGER_4) extern void maxloc0_4_i2 (gfc_array_i4 * const restrict retarray, - gfc_array_i2 * const restrict array); + gfc_array_i2 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_4_i2); void maxloc0_4_i2 (gfc_array_i4 * const restrict retarray, - gfc_array_i2 * const restrict array) + gfc_array_i2 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_4_i2 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_4_i2 (gfc_array_i4 * const restrict retarray, extern void mmaxloc0_4_i2 (gfc_array_i4 * const restrict, - gfc_array_i2 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i2 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_4_i2); void mmaxloc0_4_i2 (gfc_array_i4 * const restrict retarray, gfc_array_i2 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_4_i2 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_4_i2 (gfc_array_i4 * const restrict retarray, extern void smaxloc0_4_i2 (gfc_array_i4 * const restrict, - gfc_array_i2 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i2 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_4_i2); void smaxloc0_4_i2 (gfc_array_i4 * const restrict retarray, gfc_array_i2 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_4_i2 (gfc_array_i4 * const restrict retarray, if (*mask) { - maxloc0_4_i2 (retarray, array); + maxloc0_4_i2 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_4_i4.c b/libgfortran/generated/maxloc0_4_i4.c index cc6ad84..58c3cf1 100644 --- a/libgfortran/generated/maxloc0_4_i4.c +++ b/libgfortran/generated/maxloc0_4_i4.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4) extern void maxloc0_4_i4 (gfc_array_i4 * const restrict retarray, - gfc_array_i4 * const restrict array); + gfc_array_i4 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_4_i4); void maxloc0_4_i4 (gfc_array_i4 * const restrict retarray, - gfc_array_i4 * const restrict array) + gfc_array_i4 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_4_i4 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_4_i4 (gfc_array_i4 * const restrict retarray, extern void mmaxloc0_4_i4 (gfc_array_i4 * const restrict, - gfc_array_i4 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i4 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_4_i4); void mmaxloc0_4_i4 (gfc_array_i4 * const restrict retarray, gfc_array_i4 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_4_i4 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_4_i4 (gfc_array_i4 * const restrict retarray, extern void smaxloc0_4_i4 (gfc_array_i4 * const restrict, - gfc_array_i4 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i4 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_4_i4); void smaxloc0_4_i4 (gfc_array_i4 * const restrict retarray, gfc_array_i4 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_4_i4 (gfc_array_i4 * const restrict retarray, if (*mask) { - maxloc0_4_i4 (retarray, array); + maxloc0_4_i4 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_4_i8.c b/libgfortran/generated/maxloc0_4_i8.c index 802f935..ded9b5b 100644 --- a/libgfortran/generated/maxloc0_4_i8.c +++ b/libgfortran/generated/maxloc0_4_i8.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_INTEGER_4) extern void maxloc0_4_i8 (gfc_array_i4 * const restrict retarray, - gfc_array_i8 * const restrict array); + gfc_array_i8 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_4_i8); void maxloc0_4_i8 (gfc_array_i4 * const restrict retarray, - gfc_array_i8 * const restrict array) + gfc_array_i8 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_4_i8 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_4_i8 (gfc_array_i4 * const restrict retarray, extern void mmaxloc0_4_i8 (gfc_array_i4 * const restrict, - gfc_array_i8 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i8 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_4_i8); void mmaxloc0_4_i8 (gfc_array_i4 * const restrict retarray, gfc_array_i8 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_4_i8 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_4_i8 (gfc_array_i4 * const restrict retarray, extern void smaxloc0_4_i8 (gfc_array_i4 * const restrict, - gfc_array_i8 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i8 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_4_i8); void smaxloc0_4_i8 (gfc_array_i4 * const restrict retarray, gfc_array_i8 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_4_i8 (gfc_array_i4 * const restrict retarray, if (*mask) { - maxloc0_4_i8 (retarray, array); + maxloc0_4_i8 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_4_r10.c b/libgfortran/generated/maxloc0_4_r10.c index 1222096..c64bd53 100644 --- a/libgfortran/generated/maxloc0_4_r10.c +++ b/libgfortran/generated/maxloc0_4_r10.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_10) && defined (HAVE_GFC_INTEGER_4) extern void maxloc0_4_r10 (gfc_array_i4 * const restrict retarray, - gfc_array_r10 * const restrict array); + gfc_array_r10 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_4_r10); void maxloc0_4_r10 (gfc_array_i4 * const restrict retarray, - gfc_array_r10 * const restrict array) + gfc_array_r10 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_4_r10 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_4_r10 (gfc_array_i4 * const restrict retarray, extern void mmaxloc0_4_r10 (gfc_array_i4 * const restrict, - gfc_array_r10 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r10 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_4_r10); void mmaxloc0_4_r10 (gfc_array_i4 * const restrict retarray, gfc_array_r10 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_4_r10 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_4_r10 (gfc_array_i4 * const restrict retarray, extern void smaxloc0_4_r10 (gfc_array_i4 * const restrict, - gfc_array_r10 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r10 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_4_r10); void smaxloc0_4_r10 (gfc_array_i4 * const restrict retarray, gfc_array_r10 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_4_r10 (gfc_array_i4 * const restrict retarray, if (*mask) { - maxloc0_4_r10 (retarray, array); + maxloc0_4_r10 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_4_r16.c b/libgfortran/generated/maxloc0_4_r16.c index deaca72..4fd46a3 100644 --- a/libgfortran/generated/maxloc0_4_r16.c +++ b/libgfortran/generated/maxloc0_4_r16.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_16) && defined (HAVE_GFC_INTEGER_4) extern void maxloc0_4_r16 (gfc_array_i4 * const restrict retarray, - gfc_array_r16 * const restrict array); + gfc_array_r16 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_4_r16); void maxloc0_4_r16 (gfc_array_i4 * const restrict retarray, - gfc_array_r16 * const restrict array) + gfc_array_r16 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_4_r16 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_4_r16 (gfc_array_i4 * const restrict retarray, extern void mmaxloc0_4_r16 (gfc_array_i4 * const restrict, - gfc_array_r16 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r16 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_4_r16); void mmaxloc0_4_r16 (gfc_array_i4 * const restrict retarray, gfc_array_r16 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_4_r16 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_4_r16 (gfc_array_i4 * const restrict retarray, extern void smaxloc0_4_r16 (gfc_array_i4 * const restrict, - gfc_array_r16 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r16 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_4_r16); void smaxloc0_4_r16 (gfc_array_i4 * const restrict retarray, gfc_array_r16 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_4_r16 (gfc_array_i4 * const restrict retarray, if (*mask) { - maxloc0_4_r16 (retarray, array); + maxloc0_4_r16 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_4_r4.c b/libgfortran/generated/maxloc0_4_r4.c index aa7fca0..c168aee 100644 --- a/libgfortran/generated/maxloc0_4_r4.c +++ b/libgfortran/generated/maxloc0_4_r4.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_4) && defined (HAVE_GFC_INTEGER_4) extern void maxloc0_4_r4 (gfc_array_i4 * const restrict retarray, - gfc_array_r4 * const restrict array); + gfc_array_r4 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_4_r4); void maxloc0_4_r4 (gfc_array_i4 * const restrict retarray, - gfc_array_r4 * const restrict array) + gfc_array_r4 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_4_r4 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_4_r4 (gfc_array_i4 * const restrict retarray, extern void mmaxloc0_4_r4 (gfc_array_i4 * const restrict, - gfc_array_r4 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r4 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_4_r4); void mmaxloc0_4_r4 (gfc_array_i4 * const restrict retarray, gfc_array_r4 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_4_r4 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_4_r4 (gfc_array_i4 * const restrict retarray, extern void smaxloc0_4_r4 (gfc_array_i4 * const restrict, - gfc_array_r4 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r4 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_4_r4); void smaxloc0_4_r4 (gfc_array_i4 * const restrict retarray, gfc_array_r4 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_4_r4 (gfc_array_i4 * const restrict retarray, if (*mask) { - maxloc0_4_r4 (retarray, array); + maxloc0_4_r4 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_4_r8.c b/libgfortran/generated/maxloc0_4_r8.c index ba0659d..655a652 100644 --- a/libgfortran/generated/maxloc0_4_r8.c +++ b/libgfortran/generated/maxloc0_4_r8.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_8) && defined (HAVE_GFC_INTEGER_4) extern void maxloc0_4_r8 (gfc_array_i4 * const restrict retarray, - gfc_array_r8 * const restrict array); + gfc_array_r8 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_4_r8); void maxloc0_4_r8 (gfc_array_i4 * const restrict retarray, - gfc_array_r8 * const restrict array) + gfc_array_r8 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_4_r8 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_4_r8 (gfc_array_i4 * const restrict retarray, extern void mmaxloc0_4_r8 (gfc_array_i4 * const restrict, - gfc_array_r8 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r8 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_4_r8); void mmaxloc0_4_r8 (gfc_array_i4 * const restrict retarray, gfc_array_r8 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_4_r8 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_4_r8 (gfc_array_i4 * const restrict retarray, extern void smaxloc0_4_r8 (gfc_array_i4 * const restrict, - gfc_array_r8 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r8 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_4_r8); void smaxloc0_4_r8 (gfc_array_i4 * const restrict retarray, gfc_array_r8 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_4_r8 (gfc_array_i4 * const restrict retarray, if (*mask) { - maxloc0_4_r8 (retarray, array); + maxloc0_4_r8 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_4_s1.c b/libgfortran/generated/maxloc0_4_s1.c index 80759a6..b13a9b9 100644 --- a/libgfortran/generated/maxloc0_4_s1.c +++ b/libgfortran/generated/maxloc0_4_s1.c @@ -32,6 +32,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + static inline int compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) { @@ -43,12 +45,12 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) } extern void maxloc0_4_s1 (gfc_array_i4 * const restrict retarray, - gfc_array_s1 * const restrict array, gfc_charlen_type len); + gfc_array_s1 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len); export_proto(maxloc0_4_s1); void maxloc0_4_s1 (gfc_array_i4 * const restrict retarray, - gfc_array_s1 * const restrict array, gfc_charlen_type len) + gfc_array_s1 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -59,6 +61,10 @@ maxloc0_4_s1 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -149,13 +155,15 @@ maxloc0_4_s1 (gfc_array_i4 * const restrict retarray, extern void mmaxloc0_4_s1 (gfc_array_i4 * const restrict, - gfc_array_s1 * const restrict, gfc_array_l1 * const restrict, gfc_charlen_type len); + gfc_array_s1 * const restrict, gfc_array_l1 * const restrict , GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(mmaxloc0_4_s1); void mmaxloc0_4_s1 (gfc_array_i4 * const restrict retarray, gfc_array_s1 * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -169,6 +177,9 @@ mmaxloc0_4_s1 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -282,13 +293,15 @@ mmaxloc0_4_s1 (gfc_array_i4 * const restrict retarray, extern void smaxloc0_4_s1 (gfc_array_i4 * const restrict, - gfc_array_s1 * const restrict, GFC_LOGICAL_4 *, gfc_charlen_type len); + gfc_array_s1 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(smaxloc0_4_s1); void smaxloc0_4_s1 (gfc_array_i4 * const restrict retarray, gfc_array_s1 * const restrict array, - GFC_LOGICAL_4 * mask, gfc_charlen_type len) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type rank; index_type dstride; @@ -297,7 +310,11 @@ smaxloc0_4_s1 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc0_4_s1 (retarray, array, back, len); +#else maxloc0_4_s1 (retarray, array, len); +#endif return; } diff --git a/libgfortran/generated/maxloc0_4_s4.c b/libgfortran/generated/maxloc0_4_s4.c index 75eeaee..971e868 100644 --- a/libgfortran/generated/maxloc0_4_s4.c +++ b/libgfortran/generated/maxloc0_4_s4.c @@ -32,6 +32,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + static inline int compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) { @@ -43,12 +45,12 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) } extern void maxloc0_4_s4 (gfc_array_i4 * const restrict retarray, - gfc_array_s4 * const restrict array, gfc_charlen_type len); + gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len); export_proto(maxloc0_4_s4); void maxloc0_4_s4 (gfc_array_i4 * const restrict retarray, - gfc_array_s4 * const restrict array, gfc_charlen_type len) + gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -59,6 +61,10 @@ maxloc0_4_s4 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -149,13 +155,15 @@ maxloc0_4_s4 (gfc_array_i4 * const restrict retarray, extern void mmaxloc0_4_s4 (gfc_array_i4 * const restrict, - gfc_array_s4 * const restrict, gfc_array_l1 * const restrict, gfc_charlen_type len); + gfc_array_s4 * const restrict, gfc_array_l1 * const restrict , GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(mmaxloc0_4_s4); void mmaxloc0_4_s4 (gfc_array_i4 * const restrict retarray, gfc_array_s4 * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -169,6 +177,9 @@ mmaxloc0_4_s4 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -282,13 +293,15 @@ mmaxloc0_4_s4 (gfc_array_i4 * const restrict retarray, extern void smaxloc0_4_s4 (gfc_array_i4 * const restrict, - gfc_array_s4 * const restrict, GFC_LOGICAL_4 *, gfc_charlen_type len); + gfc_array_s4 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(smaxloc0_4_s4); void smaxloc0_4_s4 (gfc_array_i4 * const restrict retarray, gfc_array_s4 * const restrict array, - GFC_LOGICAL_4 * mask, gfc_charlen_type len) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type rank; index_type dstride; @@ -297,7 +310,11 @@ smaxloc0_4_s4 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc0_4_s4 (retarray, array, back, len); +#else maxloc0_4_s4 (retarray, array, len); +#endif return; } diff --git a/libgfortran/generated/maxloc0_8_i1.c b/libgfortran/generated/maxloc0_8_i1.c index dd07066..b86f0cb 100644 --- a/libgfortran/generated/maxloc0_8_i1.c +++ b/libgfortran/generated/maxloc0_8_i1.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_8) extern void maxloc0_8_i1 (gfc_array_i8 * const restrict retarray, - gfc_array_i1 * const restrict array); + gfc_array_i1 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_8_i1); void maxloc0_8_i1 (gfc_array_i8 * const restrict retarray, - gfc_array_i1 * const restrict array) + gfc_array_i1 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_8_i1 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_8_i1 (gfc_array_i8 * const restrict retarray, extern void mmaxloc0_8_i1 (gfc_array_i8 * const restrict, - gfc_array_i1 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i1 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_8_i1); void mmaxloc0_8_i1 (gfc_array_i8 * const restrict retarray, gfc_array_i1 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_8_i1 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_8_i1 (gfc_array_i8 * const restrict retarray, extern void smaxloc0_8_i1 (gfc_array_i8 * const restrict, - gfc_array_i1 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i1 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_8_i1); void smaxloc0_8_i1 (gfc_array_i8 * const restrict retarray, gfc_array_i1 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_8_i1 (gfc_array_i8 * const restrict retarray, if (*mask) { - maxloc0_8_i1 (retarray, array); + maxloc0_8_i1 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_8_i16.c b/libgfortran/generated/maxloc0_8_i16.c index 44ab70c..710d260 100644 --- a/libgfortran/generated/maxloc0_8_i16.c +++ b/libgfortran/generated/maxloc0_8_i16.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_INTEGER_8) extern void maxloc0_8_i16 (gfc_array_i8 * const restrict retarray, - gfc_array_i16 * const restrict array); + gfc_array_i16 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_8_i16); void maxloc0_8_i16 (gfc_array_i8 * const restrict retarray, - gfc_array_i16 * const restrict array) + gfc_array_i16 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_8_i16 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_8_i16 (gfc_array_i8 * const restrict retarray, extern void mmaxloc0_8_i16 (gfc_array_i8 * const restrict, - gfc_array_i16 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i16 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_8_i16); void mmaxloc0_8_i16 (gfc_array_i8 * const restrict retarray, gfc_array_i16 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_8_i16 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_8_i16 (gfc_array_i8 * const restrict retarray, extern void smaxloc0_8_i16 (gfc_array_i8 * const restrict, - gfc_array_i16 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i16 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_8_i16); void smaxloc0_8_i16 (gfc_array_i8 * const restrict retarray, gfc_array_i16 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_8_i16 (gfc_array_i8 * const restrict retarray, if (*mask) { - maxloc0_8_i16 (retarray, array); + maxloc0_8_i16 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_8_i2.c b/libgfortran/generated/maxloc0_8_i2.c index 6dfd0d8..e85fb07 100644 --- a/libgfortran/generated/maxloc0_8_i2.c +++ b/libgfortran/generated/maxloc0_8_i2.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_2) && defined (HAVE_GFC_INTEGER_8) extern void maxloc0_8_i2 (gfc_array_i8 * const restrict retarray, - gfc_array_i2 * const restrict array); + gfc_array_i2 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_8_i2); void maxloc0_8_i2 (gfc_array_i8 * const restrict retarray, - gfc_array_i2 * const restrict array) + gfc_array_i2 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_8_i2 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_8_i2 (gfc_array_i8 * const restrict retarray, extern void mmaxloc0_8_i2 (gfc_array_i8 * const restrict, - gfc_array_i2 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i2 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_8_i2); void mmaxloc0_8_i2 (gfc_array_i8 * const restrict retarray, gfc_array_i2 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_8_i2 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_8_i2 (gfc_array_i8 * const restrict retarray, extern void smaxloc0_8_i2 (gfc_array_i8 * const restrict, - gfc_array_i2 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i2 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_8_i2); void smaxloc0_8_i2 (gfc_array_i8 * const restrict retarray, gfc_array_i2 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_8_i2 (gfc_array_i8 * const restrict retarray, if (*mask) { - maxloc0_8_i2 (retarray, array); + maxloc0_8_i2 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_8_i4.c b/libgfortran/generated/maxloc0_8_i4.c index 01b18c3..bb6d51e 100644 --- a/libgfortran/generated/maxloc0_8_i4.c +++ b/libgfortran/generated/maxloc0_8_i4.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_8) extern void maxloc0_8_i4 (gfc_array_i8 * const restrict retarray, - gfc_array_i4 * const restrict array); + gfc_array_i4 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_8_i4); void maxloc0_8_i4 (gfc_array_i8 * const restrict retarray, - gfc_array_i4 * const restrict array) + gfc_array_i4 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_8_i4 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_8_i4 (gfc_array_i8 * const restrict retarray, extern void mmaxloc0_8_i4 (gfc_array_i8 * const restrict, - gfc_array_i4 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i4 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_8_i4); void mmaxloc0_8_i4 (gfc_array_i8 * const restrict retarray, gfc_array_i4 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_8_i4 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_8_i4 (gfc_array_i8 * const restrict retarray, extern void smaxloc0_8_i4 (gfc_array_i8 * const restrict, - gfc_array_i4 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i4 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_8_i4); void smaxloc0_8_i4 (gfc_array_i8 * const restrict retarray, gfc_array_i4 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_8_i4 (gfc_array_i8 * const restrict retarray, if (*mask) { - maxloc0_8_i4 (retarray, array); + maxloc0_8_i4 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_8_i8.c b/libgfortran/generated/maxloc0_8_i8.c index df7544f..d6c6e85 100644 --- a/libgfortran/generated/maxloc0_8_i8.c +++ b/libgfortran/generated/maxloc0_8_i8.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_INTEGER_8) extern void maxloc0_8_i8 (gfc_array_i8 * const restrict retarray, - gfc_array_i8 * const restrict array); + gfc_array_i8 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_8_i8); void maxloc0_8_i8 (gfc_array_i8 * const restrict retarray, - gfc_array_i8 * const restrict array) + gfc_array_i8 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_8_i8 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_8_i8 (gfc_array_i8 * const restrict retarray, extern void mmaxloc0_8_i8 (gfc_array_i8 * const restrict, - gfc_array_i8 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i8 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_8_i8); void mmaxloc0_8_i8 (gfc_array_i8 * const restrict retarray, gfc_array_i8 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_8_i8 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_8_i8 (gfc_array_i8 * const restrict retarray, extern void smaxloc0_8_i8 (gfc_array_i8 * const restrict, - gfc_array_i8 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i8 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_8_i8); void smaxloc0_8_i8 (gfc_array_i8 * const restrict retarray, gfc_array_i8 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_8_i8 (gfc_array_i8 * const restrict retarray, if (*mask) { - maxloc0_8_i8 (retarray, array); + maxloc0_8_i8 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_8_r10.c b/libgfortran/generated/maxloc0_8_r10.c index 3047b1e..333e570 100644 --- a/libgfortran/generated/maxloc0_8_r10.c +++ b/libgfortran/generated/maxloc0_8_r10.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_10) && defined (HAVE_GFC_INTEGER_8) extern void maxloc0_8_r10 (gfc_array_i8 * const restrict retarray, - gfc_array_r10 * const restrict array); + gfc_array_r10 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_8_r10); void maxloc0_8_r10 (gfc_array_i8 * const restrict retarray, - gfc_array_r10 * const restrict array) + gfc_array_r10 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_8_r10 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_8_r10 (gfc_array_i8 * const restrict retarray, extern void mmaxloc0_8_r10 (gfc_array_i8 * const restrict, - gfc_array_r10 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r10 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_8_r10); void mmaxloc0_8_r10 (gfc_array_i8 * const restrict retarray, gfc_array_r10 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_8_r10 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_8_r10 (gfc_array_i8 * const restrict retarray, extern void smaxloc0_8_r10 (gfc_array_i8 * const restrict, - gfc_array_r10 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r10 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_8_r10); void smaxloc0_8_r10 (gfc_array_i8 * const restrict retarray, gfc_array_r10 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_8_r10 (gfc_array_i8 * const restrict retarray, if (*mask) { - maxloc0_8_r10 (retarray, array); + maxloc0_8_r10 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_8_r16.c b/libgfortran/generated/maxloc0_8_r16.c index baf000c..ebb3118 100644 --- a/libgfortran/generated/maxloc0_8_r16.c +++ b/libgfortran/generated/maxloc0_8_r16.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_16) && defined (HAVE_GFC_INTEGER_8) extern void maxloc0_8_r16 (gfc_array_i8 * const restrict retarray, - gfc_array_r16 * const restrict array); + gfc_array_r16 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_8_r16); void maxloc0_8_r16 (gfc_array_i8 * const restrict retarray, - gfc_array_r16 * const restrict array) + gfc_array_r16 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_8_r16 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_8_r16 (gfc_array_i8 * const restrict retarray, extern void mmaxloc0_8_r16 (gfc_array_i8 * const restrict, - gfc_array_r16 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r16 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_8_r16); void mmaxloc0_8_r16 (gfc_array_i8 * const restrict retarray, gfc_array_r16 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_8_r16 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_8_r16 (gfc_array_i8 * const restrict retarray, extern void smaxloc0_8_r16 (gfc_array_i8 * const restrict, - gfc_array_r16 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r16 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_8_r16); void smaxloc0_8_r16 (gfc_array_i8 * const restrict retarray, gfc_array_r16 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_8_r16 (gfc_array_i8 * const restrict retarray, if (*mask) { - maxloc0_8_r16 (retarray, array); + maxloc0_8_r16 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_8_r4.c b/libgfortran/generated/maxloc0_8_r4.c index 48fa424..afc4696 100644 --- a/libgfortran/generated/maxloc0_8_r4.c +++ b/libgfortran/generated/maxloc0_8_r4.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_4) && defined (HAVE_GFC_INTEGER_8) extern void maxloc0_8_r4 (gfc_array_i8 * const restrict retarray, - gfc_array_r4 * const restrict array); + gfc_array_r4 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_8_r4); void maxloc0_8_r4 (gfc_array_i8 * const restrict retarray, - gfc_array_r4 * const restrict array) + gfc_array_r4 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_8_r4 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_8_r4 (gfc_array_i8 * const restrict retarray, extern void mmaxloc0_8_r4 (gfc_array_i8 * const restrict, - gfc_array_r4 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r4 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_8_r4); void mmaxloc0_8_r4 (gfc_array_i8 * const restrict retarray, gfc_array_r4 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_8_r4 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_8_r4 (gfc_array_i8 * const restrict retarray, extern void smaxloc0_8_r4 (gfc_array_i8 * const restrict, - gfc_array_r4 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r4 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_8_r4); void smaxloc0_8_r4 (gfc_array_i8 * const restrict retarray, gfc_array_r4 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_8_r4 (gfc_array_i8 * const restrict retarray, if (*mask) { - maxloc0_8_r4 (retarray, array); + maxloc0_8_r4 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_8_r8.c b/libgfortran/generated/maxloc0_8_r8.c index 37a25ef..e6a2fef 100644 --- a/libgfortran/generated/maxloc0_8_r8.c +++ b/libgfortran/generated/maxloc0_8_r8.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_8) && defined (HAVE_GFC_INTEGER_8) extern void maxloc0_8_r8 (gfc_array_i8 * const restrict retarray, - gfc_array_r8 * const restrict array); + gfc_array_r8 * const restrict array, GFC_LOGICAL_4); export_proto(maxloc0_8_r8); void maxloc0_8_r8 (gfc_array_i8 * const restrict retarray, - gfc_array_r8 * const restrict array) + gfc_array_r8 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ maxloc0_8_r8 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ maxloc0_8_r8 (gfc_array_i8 * const restrict retarray, extern void mmaxloc0_8_r8 (gfc_array_i8 * const restrict, - gfc_array_r8 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r8 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mmaxloc0_8_r8); void mmaxloc0_8_r8 (gfc_array_i8 * const restrict retarray, gfc_array_r8 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mmaxloc0_8_r8 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mmaxloc0_8_r8 (gfc_array_i8 * const restrict retarray, extern void smaxloc0_8_r8 (gfc_array_i8 * const restrict, - gfc_array_r8 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r8 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(smaxloc0_8_r8); void smaxloc0_8_r8 (gfc_array_i8 * const restrict retarray, gfc_array_r8 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ smaxloc0_8_r8 (gfc_array_i8 * const restrict retarray, if (*mask) { - maxloc0_8_r8 (retarray, array); + maxloc0_8_r8 (retarray, array, back); return; } diff --git a/libgfortran/generated/maxloc0_8_s1.c b/libgfortran/generated/maxloc0_8_s1.c index 1c86ff4..2e95fa3 100644 --- a/libgfortran/generated/maxloc0_8_s1.c +++ b/libgfortran/generated/maxloc0_8_s1.c @@ -32,6 +32,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + static inline int compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) { @@ -43,12 +45,12 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) } extern void maxloc0_8_s1 (gfc_array_i8 * const restrict retarray, - gfc_array_s1 * const restrict array, gfc_charlen_type len); + gfc_array_s1 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len); export_proto(maxloc0_8_s1); void maxloc0_8_s1 (gfc_array_i8 * const restrict retarray, - gfc_array_s1 * const restrict array, gfc_charlen_type len) + gfc_array_s1 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -59,6 +61,10 @@ maxloc0_8_s1 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -149,13 +155,15 @@ maxloc0_8_s1 (gfc_array_i8 * const restrict retarray, extern void mmaxloc0_8_s1 (gfc_array_i8 * const restrict, - gfc_array_s1 * const restrict, gfc_array_l1 * const restrict, gfc_charlen_type len); + gfc_array_s1 * const restrict, gfc_array_l1 * const restrict , GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(mmaxloc0_8_s1); void mmaxloc0_8_s1 (gfc_array_i8 * const restrict retarray, gfc_array_s1 * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -169,6 +177,9 @@ mmaxloc0_8_s1 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -282,13 +293,15 @@ mmaxloc0_8_s1 (gfc_array_i8 * const restrict retarray, extern void smaxloc0_8_s1 (gfc_array_i8 * const restrict, - gfc_array_s1 * const restrict, GFC_LOGICAL_4 *, gfc_charlen_type len); + gfc_array_s1 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(smaxloc0_8_s1); void smaxloc0_8_s1 (gfc_array_i8 * const restrict retarray, gfc_array_s1 * const restrict array, - GFC_LOGICAL_4 * mask, gfc_charlen_type len) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type rank; index_type dstride; @@ -297,7 +310,11 @@ smaxloc0_8_s1 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc0_8_s1 (retarray, array, back, len); +#else maxloc0_8_s1 (retarray, array, len); +#endif return; } diff --git a/libgfortran/generated/maxloc0_8_s4.c b/libgfortran/generated/maxloc0_8_s4.c index 14f4658..5cc1f11 100644 --- a/libgfortran/generated/maxloc0_8_s4.c +++ b/libgfortran/generated/maxloc0_8_s4.c @@ -32,6 +32,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + static inline int compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) { @@ -43,12 +45,12 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) } extern void maxloc0_8_s4 (gfc_array_i8 * const restrict retarray, - gfc_array_s4 * const restrict array, gfc_charlen_type len); + gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len); export_proto(maxloc0_8_s4); void maxloc0_8_s4 (gfc_array_i8 * const restrict retarray, - gfc_array_s4 * const restrict array, gfc_charlen_type len) + gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -59,6 +61,10 @@ maxloc0_8_s4 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -149,13 +155,15 @@ maxloc0_8_s4 (gfc_array_i8 * const restrict retarray, extern void mmaxloc0_8_s4 (gfc_array_i8 * const restrict, - gfc_array_s4 * const restrict, gfc_array_l1 * const restrict, gfc_charlen_type len); + gfc_array_s4 * const restrict, gfc_array_l1 * const restrict , GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(mmaxloc0_8_s4); void mmaxloc0_8_s4 (gfc_array_i8 * const restrict retarray, gfc_array_s4 * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -169,6 +177,9 @@ mmaxloc0_8_s4 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -282,13 +293,15 @@ mmaxloc0_8_s4 (gfc_array_i8 * const restrict retarray, extern void smaxloc0_8_s4 (gfc_array_i8 * const restrict, - gfc_array_s4 * const restrict, GFC_LOGICAL_4 *, gfc_charlen_type len); + gfc_array_s4 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(smaxloc0_8_s4); void smaxloc0_8_s4 (gfc_array_i8 * const restrict retarray, gfc_array_s4 * const restrict array, - GFC_LOGICAL_4 * mask, gfc_charlen_type len) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type rank; index_type dstride; @@ -297,7 +310,11 @@ smaxloc0_8_s4 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc0_8_s4 (retarray, array, back, len); +#else maxloc0_8_s4 (retarray, array, len); +#endif return; } diff --git a/libgfortran/generated/maxloc1_16_i1.c b/libgfortran/generated/maxloc1_16_i1.c index d1d1d5e..ff2124d 100644 --- a/libgfortran/generated/maxloc1_16_i1.c +++ b/libgfortran/generated/maxloc1_16_i1.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + extern void maxloc1_16_i1 (gfc_array_i16 * const restrict, - gfc_array_i1 * const restrict, const index_type * const restrict); + gfc_array_i1 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_16_i1); void maxloc1_16_i1 (gfc_array_i16 * const restrict retarray, gfc_array_i1 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_16_i1 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_16_i1 (gfc_array_i16 * const restrict retarray, extern void mmaxloc1_16_i1 (gfc_array_i16 * const restrict, gfc_array_i1 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_16_i1); void mmaxloc1_16_i1 (gfc_array_i16 * const restrict retarray, gfc_array_i1 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_16_i1 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_16_i1 (gfc_array_i16 * const restrict retarray, extern void smaxloc1_16_i1 (gfc_array_i16 * const restrict, gfc_array_i1 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_16_i1); void smaxloc1_16_i1 (gfc_array_i16 * const restrict retarray, gfc_array_i1 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_16_i1 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_16_i1 (retarray, array, pdim, back); +#else maxloc1_16_i1 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_16_i16.c b/libgfortran/generated/maxloc1_16_i16.c index 27aa37d..2b0bd54 100644 --- a/libgfortran/generated/maxloc1_16_i16.c +++ b/libgfortran/generated/maxloc1_16_i16.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + extern void maxloc1_16_i16 (gfc_array_i16 * const restrict, - gfc_array_i16 * const restrict, const index_type * const restrict); + gfc_array_i16 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_16_i16); void maxloc1_16_i16 (gfc_array_i16 * const restrict retarray, gfc_array_i16 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_16_i16 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_16_i16 (gfc_array_i16 * const restrict retarray, extern void mmaxloc1_16_i16 (gfc_array_i16 * const restrict, gfc_array_i16 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_16_i16); void mmaxloc1_16_i16 (gfc_array_i16 * const restrict retarray, gfc_array_i16 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_16_i16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_16_i16 (gfc_array_i16 * const restrict retarray, extern void smaxloc1_16_i16 (gfc_array_i16 * const restrict, gfc_array_i16 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_16_i16); void smaxloc1_16_i16 (gfc_array_i16 * const restrict retarray, gfc_array_i16 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_16_i16 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_16_i16 (retarray, array, pdim, back); +#else maxloc1_16_i16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_16_i2.c b/libgfortran/generated/maxloc1_16_i2.c index a79088d..26c3f14 100644 --- a/libgfortran/generated/maxloc1_16_i2.c +++ b/libgfortran/generated/maxloc1_16_i2.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_2) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + extern void maxloc1_16_i2 (gfc_array_i16 * const restrict, - gfc_array_i2 * const restrict, const index_type * const restrict); + gfc_array_i2 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_16_i2); void maxloc1_16_i2 (gfc_array_i16 * const restrict retarray, gfc_array_i2 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_16_i2 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_16_i2 (gfc_array_i16 * const restrict retarray, extern void mmaxloc1_16_i2 (gfc_array_i16 * const restrict, gfc_array_i2 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_16_i2); void mmaxloc1_16_i2 (gfc_array_i16 * const restrict retarray, gfc_array_i2 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_16_i2 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_16_i2 (gfc_array_i16 * const restrict retarray, extern void smaxloc1_16_i2 (gfc_array_i16 * const restrict, gfc_array_i2 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_16_i2); void smaxloc1_16_i2 (gfc_array_i16 * const restrict retarray, gfc_array_i2 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_16_i2 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_16_i2 (retarray, array, pdim, back); +#else maxloc1_16_i2 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_16_i4.c b/libgfortran/generated/maxloc1_16_i4.c index 852677d..aedc22a 100644 --- a/libgfortran/generated/maxloc1_16_i4.c +++ b/libgfortran/generated/maxloc1_16_i4.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + extern void maxloc1_16_i4 (gfc_array_i16 * const restrict, - gfc_array_i4 * const restrict, const index_type * const restrict); + gfc_array_i4 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_16_i4); void maxloc1_16_i4 (gfc_array_i16 * const restrict retarray, gfc_array_i4 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_16_i4 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_16_i4 (gfc_array_i16 * const restrict retarray, extern void mmaxloc1_16_i4 (gfc_array_i16 * const restrict, gfc_array_i4 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_16_i4); void mmaxloc1_16_i4 (gfc_array_i16 * const restrict retarray, gfc_array_i4 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_16_i4 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_16_i4 (gfc_array_i16 * const restrict retarray, extern void smaxloc1_16_i4 (gfc_array_i16 * const restrict, gfc_array_i4 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_16_i4); void smaxloc1_16_i4 (gfc_array_i16 * const restrict retarray, gfc_array_i4 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_16_i4 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_16_i4 (retarray, array, pdim, back); +#else maxloc1_16_i4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_16_i8.c b/libgfortran/generated/maxloc1_16_i8.c index 4cdc1a7..d08561d 100644 --- a/libgfortran/generated/maxloc1_16_i8.c +++ b/libgfortran/generated/maxloc1_16_i8.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + extern void maxloc1_16_i8 (gfc_array_i16 * const restrict, - gfc_array_i8 * const restrict, const index_type * const restrict); + gfc_array_i8 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_16_i8); void maxloc1_16_i8 (gfc_array_i16 * const restrict retarray, gfc_array_i8 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_16_i8 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_16_i8 (gfc_array_i16 * const restrict retarray, extern void mmaxloc1_16_i8 (gfc_array_i16 * const restrict, gfc_array_i8 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_16_i8); void mmaxloc1_16_i8 (gfc_array_i16 * const restrict retarray, gfc_array_i8 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_16_i8 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_16_i8 (gfc_array_i16 * const restrict retarray, extern void smaxloc1_16_i8 (gfc_array_i16 * const restrict, gfc_array_i8 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_16_i8); void smaxloc1_16_i8 (gfc_array_i16 * const restrict retarray, gfc_array_i8 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_16_i8 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_16_i8 (retarray, array, pdim, back); +#else maxloc1_16_i8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_16_r10.c b/libgfortran/generated/maxloc1_16_r10.c index f3f9890..a5929ee 100644 --- a/libgfortran/generated/maxloc1_16_r10.c +++ b/libgfortran/generated/maxloc1_16_r10.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_10) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + extern void maxloc1_16_r10 (gfc_array_i16 * const restrict, - gfc_array_r10 * const restrict, const index_type * const restrict); + gfc_array_r10 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_16_r10); void maxloc1_16_r10 (gfc_array_i16 * const restrict retarray, gfc_array_r10 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_16_r10 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_16_r10 (gfc_array_i16 * const restrict retarray, extern void mmaxloc1_16_r10 (gfc_array_i16 * const restrict, gfc_array_r10 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_16_r10); void mmaxloc1_16_r10 (gfc_array_i16 * const restrict retarray, gfc_array_r10 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_16_r10 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_16_r10 (gfc_array_i16 * const restrict retarray, extern void smaxloc1_16_r10 (gfc_array_i16 * const restrict, gfc_array_r10 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_16_r10); void smaxloc1_16_r10 (gfc_array_i16 * const restrict retarray, gfc_array_r10 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_16_r10 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_16_r10 (retarray, array, pdim, back); +#else maxloc1_16_r10 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_16_r16.c b/libgfortran/generated/maxloc1_16_r16.c index 6bbef79..09da740 100644 --- a/libgfortran/generated/maxloc1_16_r16.c +++ b/libgfortran/generated/maxloc1_16_r16.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_16) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + extern void maxloc1_16_r16 (gfc_array_i16 * const restrict, - gfc_array_r16 * const restrict, const index_type * const restrict); + gfc_array_r16 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_16_r16); void maxloc1_16_r16 (gfc_array_i16 * const restrict retarray, gfc_array_r16 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_16_r16 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_16_r16 (gfc_array_i16 * const restrict retarray, extern void mmaxloc1_16_r16 (gfc_array_i16 * const restrict, gfc_array_r16 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_16_r16); void mmaxloc1_16_r16 (gfc_array_i16 * const restrict retarray, gfc_array_r16 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_16_r16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_16_r16 (gfc_array_i16 * const restrict retarray, extern void smaxloc1_16_r16 (gfc_array_i16 * const restrict, gfc_array_r16 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_16_r16); void smaxloc1_16_r16 (gfc_array_i16 * const restrict retarray, gfc_array_r16 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_16_r16 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_16_r16 (retarray, array, pdim, back); +#else maxloc1_16_r16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_16_r4.c b/libgfortran/generated/maxloc1_16_r4.c index 9801989..9278300 100644 --- a/libgfortran/generated/maxloc1_16_r4.c +++ b/libgfortran/generated/maxloc1_16_r4.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_4) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + extern void maxloc1_16_r4 (gfc_array_i16 * const restrict, - gfc_array_r4 * const restrict, const index_type * const restrict); + gfc_array_r4 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_16_r4); void maxloc1_16_r4 (gfc_array_i16 * const restrict retarray, gfc_array_r4 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_16_r4 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_16_r4 (gfc_array_i16 * const restrict retarray, extern void mmaxloc1_16_r4 (gfc_array_i16 * const restrict, gfc_array_r4 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_16_r4); void mmaxloc1_16_r4 (gfc_array_i16 * const restrict retarray, gfc_array_r4 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_16_r4 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_16_r4 (gfc_array_i16 * const restrict retarray, extern void smaxloc1_16_r4 (gfc_array_i16 * const restrict, gfc_array_r4 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_16_r4); void smaxloc1_16_r4 (gfc_array_i16 * const restrict retarray, gfc_array_r4 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_16_r4 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_16_r4 (retarray, array, pdim, back); +#else maxloc1_16_r4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_16_r8.c b/libgfortran/generated/maxloc1_16_r8.c index 86cffb9..84c0c65 100644 --- a/libgfortran/generated/maxloc1_16_r8.c +++ b/libgfortran/generated/maxloc1_16_r8.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_8) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + extern void maxloc1_16_r8 (gfc_array_i16 * const restrict, - gfc_array_r8 * const restrict, const index_type * const restrict); + gfc_array_r8 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_16_r8); void maxloc1_16_r8 (gfc_array_i16 * const restrict retarray, gfc_array_r8 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_16_r8 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_16_r8 (gfc_array_i16 * const restrict retarray, extern void mmaxloc1_16_r8 (gfc_array_i16 * const restrict, gfc_array_r8 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_16_r8); void mmaxloc1_16_r8 (gfc_array_i16 * const restrict retarray, gfc_array_r8 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_16_r8 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_16_r8 (gfc_array_i16 * const restrict retarray, extern void smaxloc1_16_r8 (gfc_array_i16 * const restrict, gfc_array_r8 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_16_r8); void smaxloc1_16_r8 (gfc_array_i16 * const restrict retarray, gfc_array_r8 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_16_r8 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_16_r8 (retarray, array, pdim, back); +#else maxloc1_16_r8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_16_s1.c b/libgfortran/generated/maxloc1_16_s1.c index 16be611..84b12f3 100644 --- a/libgfortran/generated/maxloc1_16_s1.c +++ b/libgfortran/generated/maxloc1_16_s1.c @@ -28,7 +28,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + #include <string.h> +#include <assert.h> static inline int compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) @@ -40,14 +43,15 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) } extern void maxloc1_16_s1 (gfc_array_i16 * const restrict, - gfc_array_s1 * const restrict, const index_type * const restrict, + gfc_array_s1 * const restrict, const index_type * const restrict , GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(maxloc1_16_s1); void maxloc1_16_s1 (gfc_array_i16 * const restrict retarray, gfc_array_s1 * const restrict array, - const index_type * const restrict pdim, gfc_charlen_type string_len) + const index_type * const restrict pdim, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -62,6 +66,10 @@ maxloc1_16_s1 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -210,14 +218,15 @@ maxloc1_16_s1 (gfc_array_i16 * const restrict retarray, extern void mmaxloc1_16_s1 (gfc_array_i16 * const restrict, gfc_array_s1 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict, gfc_charlen_type); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(mmaxloc1_16_s1); void mmaxloc1_16_s1 (gfc_array_i16 * const restrict retarray, gfc_array_s1 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask, gfc_charlen_type string_len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -235,6 +244,9 @@ mmaxloc1_16_s1 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -411,14 +423,14 @@ mmaxloc1_16_s1 (gfc_array_i16 * const restrict retarray, extern void smaxloc1_16_s1 (gfc_array_i16 * const restrict, gfc_array_s1 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *, gfc_charlen_type); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(smaxloc1_16_s1); void smaxloc1_16_s1 (gfc_array_i16 * const restrict retarray, gfc_array_s1 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask, gfc_charlen_type string_len) + GFC_LOGICAL_4 * mask , GFC_LOGICAL_4 back, gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -431,7 +443,11 @@ smaxloc1_16_s1 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_16_s1 (retarray, array, pdim, back, string_len); +#else maxloc1_16_s1 (retarray, array, pdim, string_len); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_16_s4.c b/libgfortran/generated/maxloc1_16_s4.c index 09bbb99..70696f2 100644 --- a/libgfortran/generated/maxloc1_16_s4.c +++ b/libgfortran/generated/maxloc1_16_s4.c @@ -28,7 +28,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + #include <string.h> +#include <assert.h> static inline int compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) @@ -40,14 +43,15 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) } extern void maxloc1_16_s4 (gfc_array_i16 * const restrict, - gfc_array_s4 * const restrict, const index_type * const restrict, + gfc_array_s4 * const restrict, const index_type * const restrict , GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(maxloc1_16_s4); void maxloc1_16_s4 (gfc_array_i16 * const restrict retarray, gfc_array_s4 * const restrict array, - const index_type * const restrict pdim, gfc_charlen_type string_len) + const index_type * const restrict pdim, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -62,6 +66,10 @@ maxloc1_16_s4 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -210,14 +218,15 @@ maxloc1_16_s4 (gfc_array_i16 * const restrict retarray, extern void mmaxloc1_16_s4 (gfc_array_i16 * const restrict, gfc_array_s4 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict, gfc_charlen_type); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(mmaxloc1_16_s4); void mmaxloc1_16_s4 (gfc_array_i16 * const restrict retarray, gfc_array_s4 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask, gfc_charlen_type string_len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -235,6 +244,9 @@ mmaxloc1_16_s4 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -411,14 +423,14 @@ mmaxloc1_16_s4 (gfc_array_i16 * const restrict retarray, extern void smaxloc1_16_s4 (gfc_array_i16 * const restrict, gfc_array_s4 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *, gfc_charlen_type); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(smaxloc1_16_s4); void smaxloc1_16_s4 (gfc_array_i16 * const restrict retarray, gfc_array_s4 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask, gfc_charlen_type string_len) + GFC_LOGICAL_4 * mask , GFC_LOGICAL_4 back, gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -431,7 +443,11 @@ smaxloc1_16_s4 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_16_s4 (retarray, array, pdim, back, string_len); +#else maxloc1_16_s4 (retarray, array, pdim, string_len); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_4_i1.c b/libgfortran/generated/maxloc1_4_i1.c index 364d09e..7fc1f88 100644 --- a/libgfortran/generated/maxloc1_4_i1.c +++ b/libgfortran/generated/maxloc1_4_i1.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + extern void maxloc1_4_i1 (gfc_array_i4 * const restrict, - gfc_array_i1 * const restrict, const index_type * const restrict); + gfc_array_i1 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_4_i1); void maxloc1_4_i1 (gfc_array_i4 * const restrict retarray, gfc_array_i1 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_4_i1 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_4_i1 (gfc_array_i4 * const restrict retarray, extern void mmaxloc1_4_i1 (gfc_array_i4 * const restrict, gfc_array_i1 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_4_i1); void mmaxloc1_4_i1 (gfc_array_i4 * const restrict retarray, gfc_array_i1 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_4_i1 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_4_i1 (gfc_array_i4 * const restrict retarray, extern void smaxloc1_4_i1 (gfc_array_i4 * const restrict, gfc_array_i1 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_4_i1); void smaxloc1_4_i1 (gfc_array_i4 * const restrict retarray, gfc_array_i1 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_4_i1 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_4_i1 (retarray, array, pdim, back); +#else maxloc1_4_i1 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_4_i16.c b/libgfortran/generated/maxloc1_4_i16.c index e05a9ac..14b5e55 100644 --- a/libgfortran/generated/maxloc1_4_i16.c +++ b/libgfortran/generated/maxloc1_4_i16.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + extern void maxloc1_4_i16 (gfc_array_i4 * const restrict, - gfc_array_i16 * const restrict, const index_type * const restrict); + gfc_array_i16 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_4_i16); void maxloc1_4_i16 (gfc_array_i4 * const restrict retarray, gfc_array_i16 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_4_i16 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_4_i16 (gfc_array_i4 * const restrict retarray, extern void mmaxloc1_4_i16 (gfc_array_i4 * const restrict, gfc_array_i16 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_4_i16); void mmaxloc1_4_i16 (gfc_array_i4 * const restrict retarray, gfc_array_i16 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_4_i16 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_4_i16 (gfc_array_i4 * const restrict retarray, extern void smaxloc1_4_i16 (gfc_array_i4 * const restrict, gfc_array_i16 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_4_i16); void smaxloc1_4_i16 (gfc_array_i4 * const restrict retarray, gfc_array_i16 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_4_i16 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_4_i16 (retarray, array, pdim, back); +#else maxloc1_4_i16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_4_i2.c b/libgfortran/generated/maxloc1_4_i2.c index 3887917..9d5a98e 100644 --- a/libgfortran/generated/maxloc1_4_i2.c +++ b/libgfortran/generated/maxloc1_4_i2.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_2) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + extern void maxloc1_4_i2 (gfc_array_i4 * const restrict, - gfc_array_i2 * const restrict, const index_type * const restrict); + gfc_array_i2 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_4_i2); void maxloc1_4_i2 (gfc_array_i4 * const restrict retarray, gfc_array_i2 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_4_i2 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_4_i2 (gfc_array_i4 * const restrict retarray, extern void mmaxloc1_4_i2 (gfc_array_i4 * const restrict, gfc_array_i2 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_4_i2); void mmaxloc1_4_i2 (gfc_array_i4 * const restrict retarray, gfc_array_i2 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_4_i2 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_4_i2 (gfc_array_i4 * const restrict retarray, extern void smaxloc1_4_i2 (gfc_array_i4 * const restrict, gfc_array_i2 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_4_i2); void smaxloc1_4_i2 (gfc_array_i4 * const restrict retarray, gfc_array_i2 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_4_i2 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_4_i2 (retarray, array, pdim, back); +#else maxloc1_4_i2 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_4_i4.c b/libgfortran/generated/maxloc1_4_i4.c index bc8a7fd..23d7028 100644 --- a/libgfortran/generated/maxloc1_4_i4.c +++ b/libgfortran/generated/maxloc1_4_i4.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + extern void maxloc1_4_i4 (gfc_array_i4 * const restrict, - gfc_array_i4 * const restrict, const index_type * const restrict); + gfc_array_i4 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_4_i4); void maxloc1_4_i4 (gfc_array_i4 * const restrict retarray, gfc_array_i4 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_4_i4 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_4_i4 (gfc_array_i4 * const restrict retarray, extern void mmaxloc1_4_i4 (gfc_array_i4 * const restrict, gfc_array_i4 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_4_i4); void mmaxloc1_4_i4 (gfc_array_i4 * const restrict retarray, gfc_array_i4 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_4_i4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_4_i4 (gfc_array_i4 * const restrict retarray, extern void smaxloc1_4_i4 (gfc_array_i4 * const restrict, gfc_array_i4 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_4_i4); void smaxloc1_4_i4 (gfc_array_i4 * const restrict retarray, gfc_array_i4 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_4_i4 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_4_i4 (retarray, array, pdim, back); +#else maxloc1_4_i4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_4_i8.c b/libgfortran/generated/maxloc1_4_i8.c index e1d2aee..178a20a 100644 --- a/libgfortran/generated/maxloc1_4_i8.c +++ b/libgfortran/generated/maxloc1_4_i8.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + extern void maxloc1_4_i8 (gfc_array_i4 * const restrict, - gfc_array_i8 * const restrict, const index_type * const restrict); + gfc_array_i8 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_4_i8); void maxloc1_4_i8 (gfc_array_i4 * const restrict retarray, gfc_array_i8 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_4_i8 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_4_i8 (gfc_array_i4 * const restrict retarray, extern void mmaxloc1_4_i8 (gfc_array_i4 * const restrict, gfc_array_i8 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_4_i8); void mmaxloc1_4_i8 (gfc_array_i4 * const restrict retarray, gfc_array_i8 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_4_i8 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_4_i8 (gfc_array_i4 * const restrict retarray, extern void smaxloc1_4_i8 (gfc_array_i4 * const restrict, gfc_array_i8 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_4_i8); void smaxloc1_4_i8 (gfc_array_i4 * const restrict retarray, gfc_array_i8 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_4_i8 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_4_i8 (retarray, array, pdim, back); +#else maxloc1_4_i8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_4_r10.c b/libgfortran/generated/maxloc1_4_r10.c index 03d55cc..f359613 100644 --- a/libgfortran/generated/maxloc1_4_r10.c +++ b/libgfortran/generated/maxloc1_4_r10.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_10) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + extern void maxloc1_4_r10 (gfc_array_i4 * const restrict, - gfc_array_r10 * const restrict, const index_type * const restrict); + gfc_array_r10 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_4_r10); void maxloc1_4_r10 (gfc_array_i4 * const restrict retarray, gfc_array_r10 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_4_r10 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_4_r10 (gfc_array_i4 * const restrict retarray, extern void mmaxloc1_4_r10 (gfc_array_i4 * const restrict, gfc_array_r10 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_4_r10); void mmaxloc1_4_r10 (gfc_array_i4 * const restrict retarray, gfc_array_r10 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_4_r10 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_4_r10 (gfc_array_i4 * const restrict retarray, extern void smaxloc1_4_r10 (gfc_array_i4 * const restrict, gfc_array_r10 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_4_r10); void smaxloc1_4_r10 (gfc_array_i4 * const restrict retarray, gfc_array_r10 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_4_r10 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_4_r10 (retarray, array, pdim, back); +#else maxloc1_4_r10 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_4_r16.c b/libgfortran/generated/maxloc1_4_r16.c index 1d86824..a0f283e 100644 --- a/libgfortran/generated/maxloc1_4_r16.c +++ b/libgfortran/generated/maxloc1_4_r16.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_16) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + extern void maxloc1_4_r16 (gfc_array_i4 * const restrict, - gfc_array_r16 * const restrict, const index_type * const restrict); + gfc_array_r16 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_4_r16); void maxloc1_4_r16 (gfc_array_i4 * const restrict retarray, gfc_array_r16 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_4_r16 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_4_r16 (gfc_array_i4 * const restrict retarray, extern void mmaxloc1_4_r16 (gfc_array_i4 * const restrict, gfc_array_r16 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_4_r16); void mmaxloc1_4_r16 (gfc_array_i4 * const restrict retarray, gfc_array_r16 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_4_r16 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_4_r16 (gfc_array_i4 * const restrict retarray, extern void smaxloc1_4_r16 (gfc_array_i4 * const restrict, gfc_array_r16 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_4_r16); void smaxloc1_4_r16 (gfc_array_i4 * const restrict retarray, gfc_array_r16 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_4_r16 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_4_r16 (retarray, array, pdim, back); +#else maxloc1_4_r16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_4_r4.c b/libgfortran/generated/maxloc1_4_r4.c index 8dcae97..aeb4b8f 100644 --- a/libgfortran/generated/maxloc1_4_r4.c +++ b/libgfortran/generated/maxloc1_4_r4.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_4) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + extern void maxloc1_4_r4 (gfc_array_i4 * const restrict, - gfc_array_r4 * const restrict, const index_type * const restrict); + gfc_array_r4 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_4_r4); void maxloc1_4_r4 (gfc_array_i4 * const restrict retarray, gfc_array_r4 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_4_r4 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_4_r4 (gfc_array_i4 * const restrict retarray, extern void mmaxloc1_4_r4 (gfc_array_i4 * const restrict, gfc_array_r4 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_4_r4); void mmaxloc1_4_r4 (gfc_array_i4 * const restrict retarray, gfc_array_r4 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_4_r4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_4_r4 (gfc_array_i4 * const restrict retarray, extern void smaxloc1_4_r4 (gfc_array_i4 * const restrict, gfc_array_r4 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_4_r4); void smaxloc1_4_r4 (gfc_array_i4 * const restrict retarray, gfc_array_r4 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_4_r4 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_4_r4 (retarray, array, pdim, back); +#else maxloc1_4_r4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_4_r8.c b/libgfortran/generated/maxloc1_4_r8.c index 9c0f5b1..4385204 100644 --- a/libgfortran/generated/maxloc1_4_r8.c +++ b/libgfortran/generated/maxloc1_4_r8.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_8) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + extern void maxloc1_4_r8 (gfc_array_i4 * const restrict, - gfc_array_r8 * const restrict, const index_type * const restrict); + gfc_array_r8 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_4_r8); void maxloc1_4_r8 (gfc_array_i4 * const restrict retarray, gfc_array_r8 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_4_r8 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_4_r8 (gfc_array_i4 * const restrict retarray, extern void mmaxloc1_4_r8 (gfc_array_i4 * const restrict, gfc_array_r8 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_4_r8); void mmaxloc1_4_r8 (gfc_array_i4 * const restrict retarray, gfc_array_r8 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_4_r8 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_4_r8 (gfc_array_i4 * const restrict retarray, extern void smaxloc1_4_r8 (gfc_array_i4 * const restrict, gfc_array_r8 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_4_r8); void smaxloc1_4_r8 (gfc_array_i4 * const restrict retarray, gfc_array_r8 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_4_r8 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_4_r8 (retarray, array, pdim, back); +#else maxloc1_4_r8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_4_s1.c b/libgfortran/generated/maxloc1_4_s1.c index a882a7b..b7b7d8c 100644 --- a/libgfortran/generated/maxloc1_4_s1.c +++ b/libgfortran/generated/maxloc1_4_s1.c @@ -28,7 +28,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + #include <string.h> +#include <assert.h> static inline int compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) @@ -40,14 +43,15 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) } extern void maxloc1_4_s1 (gfc_array_i4 * const restrict, - gfc_array_s1 * const restrict, const index_type * const restrict, + gfc_array_s1 * const restrict, const index_type * const restrict , GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(maxloc1_4_s1); void maxloc1_4_s1 (gfc_array_i4 * const restrict retarray, gfc_array_s1 * const restrict array, - const index_type * const restrict pdim, gfc_charlen_type string_len) + const index_type * const restrict pdim, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -62,6 +66,10 @@ maxloc1_4_s1 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -210,14 +218,15 @@ maxloc1_4_s1 (gfc_array_i4 * const restrict retarray, extern void mmaxloc1_4_s1 (gfc_array_i4 * const restrict, gfc_array_s1 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict, gfc_charlen_type); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(mmaxloc1_4_s1); void mmaxloc1_4_s1 (gfc_array_i4 * const restrict retarray, gfc_array_s1 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask, gfc_charlen_type string_len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -235,6 +244,9 @@ mmaxloc1_4_s1 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -411,14 +423,14 @@ mmaxloc1_4_s1 (gfc_array_i4 * const restrict retarray, extern void smaxloc1_4_s1 (gfc_array_i4 * const restrict, gfc_array_s1 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *, gfc_charlen_type); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(smaxloc1_4_s1); void smaxloc1_4_s1 (gfc_array_i4 * const restrict retarray, gfc_array_s1 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask, gfc_charlen_type string_len) + GFC_LOGICAL_4 * mask , GFC_LOGICAL_4 back, gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -431,7 +443,11 @@ smaxloc1_4_s1 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_4_s1 (retarray, array, pdim, back, string_len); +#else maxloc1_4_s1 (retarray, array, pdim, string_len); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_4_s4.c b/libgfortran/generated/maxloc1_4_s4.c index acc989c..da75949 100644 --- a/libgfortran/generated/maxloc1_4_s4.c +++ b/libgfortran/generated/maxloc1_4_s4.c @@ -28,7 +28,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + #include <string.h> +#include <assert.h> static inline int compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) @@ -40,14 +43,15 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) } extern void maxloc1_4_s4 (gfc_array_i4 * const restrict, - gfc_array_s4 * const restrict, const index_type * const restrict, + gfc_array_s4 * const restrict, const index_type * const restrict , GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(maxloc1_4_s4); void maxloc1_4_s4 (gfc_array_i4 * const restrict retarray, gfc_array_s4 * const restrict array, - const index_type * const restrict pdim, gfc_charlen_type string_len) + const index_type * const restrict pdim, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -62,6 +66,10 @@ maxloc1_4_s4 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -210,14 +218,15 @@ maxloc1_4_s4 (gfc_array_i4 * const restrict retarray, extern void mmaxloc1_4_s4 (gfc_array_i4 * const restrict, gfc_array_s4 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict, gfc_charlen_type); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(mmaxloc1_4_s4); void mmaxloc1_4_s4 (gfc_array_i4 * const restrict retarray, gfc_array_s4 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask, gfc_charlen_type string_len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -235,6 +244,9 @@ mmaxloc1_4_s4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -411,14 +423,14 @@ mmaxloc1_4_s4 (gfc_array_i4 * const restrict retarray, extern void smaxloc1_4_s4 (gfc_array_i4 * const restrict, gfc_array_s4 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *, gfc_charlen_type); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(smaxloc1_4_s4); void smaxloc1_4_s4 (gfc_array_i4 * const restrict retarray, gfc_array_s4 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask, gfc_charlen_type string_len) + GFC_LOGICAL_4 * mask , GFC_LOGICAL_4 back, gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -431,7 +443,11 @@ smaxloc1_4_s4 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_4_s4 (retarray, array, pdim, back, string_len); +#else maxloc1_4_s4 (retarray, array, pdim, string_len); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_8_i1.c b/libgfortran/generated/maxloc1_8_i1.c index 8087789..fa5bc4a 100644 --- a/libgfortran/generated/maxloc1_8_i1.c +++ b/libgfortran/generated/maxloc1_8_i1.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + extern void maxloc1_8_i1 (gfc_array_i8 * const restrict, - gfc_array_i1 * const restrict, const index_type * const restrict); + gfc_array_i1 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_8_i1); void maxloc1_8_i1 (gfc_array_i8 * const restrict retarray, gfc_array_i1 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_8_i1 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_8_i1 (gfc_array_i8 * const restrict retarray, extern void mmaxloc1_8_i1 (gfc_array_i8 * const restrict, gfc_array_i1 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_8_i1); void mmaxloc1_8_i1 (gfc_array_i8 * const restrict retarray, gfc_array_i1 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_8_i1 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_8_i1 (gfc_array_i8 * const restrict retarray, extern void smaxloc1_8_i1 (gfc_array_i8 * const restrict, gfc_array_i1 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_8_i1); void smaxloc1_8_i1 (gfc_array_i8 * const restrict retarray, gfc_array_i1 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_8_i1 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_8_i1 (retarray, array, pdim, back); +#else maxloc1_8_i1 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_8_i16.c b/libgfortran/generated/maxloc1_8_i16.c index 71ad13c..2cf7531 100644 --- a/libgfortran/generated/maxloc1_8_i16.c +++ b/libgfortran/generated/maxloc1_8_i16.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + extern void maxloc1_8_i16 (gfc_array_i8 * const restrict, - gfc_array_i16 * const restrict, const index_type * const restrict); + gfc_array_i16 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_8_i16); void maxloc1_8_i16 (gfc_array_i8 * const restrict retarray, gfc_array_i16 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_8_i16 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_8_i16 (gfc_array_i8 * const restrict retarray, extern void mmaxloc1_8_i16 (gfc_array_i8 * const restrict, gfc_array_i16 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_8_i16); void mmaxloc1_8_i16 (gfc_array_i8 * const restrict retarray, gfc_array_i16 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_8_i16 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_8_i16 (gfc_array_i8 * const restrict retarray, extern void smaxloc1_8_i16 (gfc_array_i8 * const restrict, gfc_array_i16 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_8_i16); void smaxloc1_8_i16 (gfc_array_i8 * const restrict retarray, gfc_array_i16 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_8_i16 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_8_i16 (retarray, array, pdim, back); +#else maxloc1_8_i16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_8_i2.c b/libgfortran/generated/maxloc1_8_i2.c index d89b74f..e32eafe 100644 --- a/libgfortran/generated/maxloc1_8_i2.c +++ b/libgfortran/generated/maxloc1_8_i2.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_2) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + extern void maxloc1_8_i2 (gfc_array_i8 * const restrict, - gfc_array_i2 * const restrict, const index_type * const restrict); + gfc_array_i2 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_8_i2); void maxloc1_8_i2 (gfc_array_i8 * const restrict retarray, gfc_array_i2 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_8_i2 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_8_i2 (gfc_array_i8 * const restrict retarray, extern void mmaxloc1_8_i2 (gfc_array_i8 * const restrict, gfc_array_i2 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_8_i2); void mmaxloc1_8_i2 (gfc_array_i8 * const restrict retarray, gfc_array_i2 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_8_i2 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_8_i2 (gfc_array_i8 * const restrict retarray, extern void smaxloc1_8_i2 (gfc_array_i8 * const restrict, gfc_array_i2 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_8_i2); void smaxloc1_8_i2 (gfc_array_i8 * const restrict retarray, gfc_array_i2 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_8_i2 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_8_i2 (retarray, array, pdim, back); +#else maxloc1_8_i2 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_8_i4.c b/libgfortran/generated/maxloc1_8_i4.c index df4b218..e348550 100644 --- a/libgfortran/generated/maxloc1_8_i4.c +++ b/libgfortran/generated/maxloc1_8_i4.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + extern void maxloc1_8_i4 (gfc_array_i8 * const restrict, - gfc_array_i4 * const restrict, const index_type * const restrict); + gfc_array_i4 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_8_i4); void maxloc1_8_i4 (gfc_array_i8 * const restrict retarray, gfc_array_i4 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_8_i4 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_8_i4 (gfc_array_i8 * const restrict retarray, extern void mmaxloc1_8_i4 (gfc_array_i8 * const restrict, gfc_array_i4 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_8_i4); void mmaxloc1_8_i4 (gfc_array_i8 * const restrict retarray, gfc_array_i4 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_8_i4 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_8_i4 (gfc_array_i8 * const restrict retarray, extern void smaxloc1_8_i4 (gfc_array_i8 * const restrict, gfc_array_i4 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_8_i4); void smaxloc1_8_i4 (gfc_array_i8 * const restrict retarray, gfc_array_i4 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_8_i4 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_8_i4 (retarray, array, pdim, back); +#else maxloc1_8_i4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_8_i8.c b/libgfortran/generated/maxloc1_8_i8.c index 946e4ca..802b74d 100644 --- a/libgfortran/generated/maxloc1_8_i8.c +++ b/libgfortran/generated/maxloc1_8_i8.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + extern void maxloc1_8_i8 (gfc_array_i8 * const restrict, - gfc_array_i8 * const restrict, const index_type * const restrict); + gfc_array_i8 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_8_i8); void maxloc1_8_i8 (gfc_array_i8 * const restrict retarray, gfc_array_i8 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_8_i8 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_8_i8 (gfc_array_i8 * const restrict retarray, extern void mmaxloc1_8_i8 (gfc_array_i8 * const restrict, gfc_array_i8 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_8_i8); void mmaxloc1_8_i8 (gfc_array_i8 * const restrict retarray, gfc_array_i8 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_8_i8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_8_i8 (gfc_array_i8 * const restrict retarray, extern void smaxloc1_8_i8 (gfc_array_i8 * const restrict, gfc_array_i8 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_8_i8); void smaxloc1_8_i8 (gfc_array_i8 * const restrict retarray, gfc_array_i8 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_8_i8 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_8_i8 (retarray, array, pdim, back); +#else maxloc1_8_i8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_8_r10.c b/libgfortran/generated/maxloc1_8_r10.c index a7db332..bc5f1b1 100644 --- a/libgfortran/generated/maxloc1_8_r10.c +++ b/libgfortran/generated/maxloc1_8_r10.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_10) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + extern void maxloc1_8_r10 (gfc_array_i8 * const restrict, - gfc_array_r10 * const restrict, const index_type * const restrict); + gfc_array_r10 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_8_r10); void maxloc1_8_r10 (gfc_array_i8 * const restrict retarray, gfc_array_r10 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_8_r10 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_8_r10 (gfc_array_i8 * const restrict retarray, extern void mmaxloc1_8_r10 (gfc_array_i8 * const restrict, gfc_array_r10 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_8_r10); void mmaxloc1_8_r10 (gfc_array_i8 * const restrict retarray, gfc_array_r10 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_8_r10 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_8_r10 (gfc_array_i8 * const restrict retarray, extern void smaxloc1_8_r10 (gfc_array_i8 * const restrict, gfc_array_r10 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_8_r10); void smaxloc1_8_r10 (gfc_array_i8 * const restrict retarray, gfc_array_r10 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_8_r10 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_8_r10 (retarray, array, pdim, back); +#else maxloc1_8_r10 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_8_r16.c b/libgfortran/generated/maxloc1_8_r16.c index e118f12..54d1203 100644 --- a/libgfortran/generated/maxloc1_8_r16.c +++ b/libgfortran/generated/maxloc1_8_r16.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_16) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + extern void maxloc1_8_r16 (gfc_array_i8 * const restrict, - gfc_array_r16 * const restrict, const index_type * const restrict); + gfc_array_r16 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_8_r16); void maxloc1_8_r16 (gfc_array_i8 * const restrict retarray, gfc_array_r16 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_8_r16 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_8_r16 (gfc_array_i8 * const restrict retarray, extern void mmaxloc1_8_r16 (gfc_array_i8 * const restrict, gfc_array_r16 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_8_r16); void mmaxloc1_8_r16 (gfc_array_i8 * const restrict retarray, gfc_array_r16 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_8_r16 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_8_r16 (gfc_array_i8 * const restrict retarray, extern void smaxloc1_8_r16 (gfc_array_i8 * const restrict, gfc_array_r16 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_8_r16); void smaxloc1_8_r16 (gfc_array_i8 * const restrict retarray, gfc_array_r16 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_8_r16 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_8_r16 (retarray, array, pdim, back); +#else maxloc1_8_r16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_8_r4.c b/libgfortran/generated/maxloc1_8_r4.c index b97cd4c..5895585 100644 --- a/libgfortran/generated/maxloc1_8_r4.c +++ b/libgfortran/generated/maxloc1_8_r4.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_4) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + extern void maxloc1_8_r4 (gfc_array_i8 * const restrict, - gfc_array_r4 * const restrict, const index_type * const restrict); + gfc_array_r4 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_8_r4); void maxloc1_8_r4 (gfc_array_i8 * const restrict retarray, gfc_array_r4 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_8_r4 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_8_r4 (gfc_array_i8 * const restrict retarray, extern void mmaxloc1_8_r4 (gfc_array_i8 * const restrict, gfc_array_r4 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_8_r4); void mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, gfc_array_r4 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, extern void smaxloc1_8_r4 (gfc_array_i8 * const restrict, gfc_array_r4 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_8_r4); void smaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, gfc_array_r4 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_8_r4 (retarray, array, pdim, back); +#else maxloc1_8_r4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_8_r8.c b/libgfortran/generated/maxloc1_8_r8.c index 69c0c29..8c79dd4 100644 --- a/libgfortran/generated/maxloc1_8_r8.c +++ b/libgfortran/generated/maxloc1_8_r8.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_8) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + extern void maxloc1_8_r8 (gfc_array_i8 * const restrict, - gfc_array_r8 * const restrict, const index_type * const restrict); + gfc_array_r8 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(maxloc1_8_r8); void maxloc1_8_r8 (gfc_array_i8 * const restrict retarray, gfc_array_r8 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ maxloc1_8_r8 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ maxloc1_8_r8 (gfc_array_i8 * const restrict retarray, extern void mmaxloc1_8_r8 (gfc_array_i8 * const restrict, gfc_array_r8 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mmaxloc1_8_r8); void mmaxloc1_8_r8 (gfc_array_i8 * const restrict retarray, gfc_array_r8 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mmaxloc1_8_r8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mmaxloc1_8_r8 (gfc_array_i8 * const restrict retarray, extern void smaxloc1_8_r8 (gfc_array_i8 * const restrict, gfc_array_r8 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(smaxloc1_8_r8); void smaxloc1_8_r8 (gfc_array_i8 * const restrict retarray, gfc_array_r8 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ smaxloc1_8_r8 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_8_r8 (retarray, array, pdim, back); +#else maxloc1_8_r8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_8_s1.c b/libgfortran/generated/maxloc1_8_s1.c index e18ec1a..aab2449 100644 --- a/libgfortran/generated/maxloc1_8_s1.c +++ b/libgfortran/generated/maxloc1_8_s1.c @@ -28,7 +28,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + #include <string.h> +#include <assert.h> static inline int compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) @@ -40,14 +43,15 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) } extern void maxloc1_8_s1 (gfc_array_i8 * const restrict, - gfc_array_s1 * const restrict, const index_type * const restrict, + gfc_array_s1 * const restrict, const index_type * const restrict , GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(maxloc1_8_s1); void maxloc1_8_s1 (gfc_array_i8 * const restrict retarray, gfc_array_s1 * const restrict array, - const index_type * const restrict pdim, gfc_charlen_type string_len) + const index_type * const restrict pdim, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -62,6 +66,10 @@ maxloc1_8_s1 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -210,14 +218,15 @@ maxloc1_8_s1 (gfc_array_i8 * const restrict retarray, extern void mmaxloc1_8_s1 (gfc_array_i8 * const restrict, gfc_array_s1 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict, gfc_charlen_type); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(mmaxloc1_8_s1); void mmaxloc1_8_s1 (gfc_array_i8 * const restrict retarray, gfc_array_s1 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask, gfc_charlen_type string_len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -235,6 +244,9 @@ mmaxloc1_8_s1 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -411,14 +423,14 @@ mmaxloc1_8_s1 (gfc_array_i8 * const restrict retarray, extern void smaxloc1_8_s1 (gfc_array_i8 * const restrict, gfc_array_s1 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *, gfc_charlen_type); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(smaxloc1_8_s1); void smaxloc1_8_s1 (gfc_array_i8 * const restrict retarray, gfc_array_s1 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask, gfc_charlen_type string_len) + GFC_LOGICAL_4 * mask , GFC_LOGICAL_4 back, gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -431,7 +443,11 @@ smaxloc1_8_s1 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_8_s1 (retarray, array, pdim, back, string_len); +#else maxloc1_8_s1 (retarray, array, pdim, string_len); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc1_8_s4.c b/libgfortran/generated/maxloc1_8_s4.c index dbe40e9..f02e2a5 100644 --- a/libgfortran/generated/maxloc1_8_s4.c +++ b/libgfortran/generated/maxloc1_8_s4.c @@ -28,7 +28,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + #include <string.h> +#include <assert.h> static inline int compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) @@ -40,14 +43,15 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) } extern void maxloc1_8_s4 (gfc_array_i8 * const restrict, - gfc_array_s4 * const restrict, const index_type * const restrict, + gfc_array_s4 * const restrict, const index_type * const restrict , GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(maxloc1_8_s4); void maxloc1_8_s4 (gfc_array_i8 * const restrict retarray, gfc_array_s4 * const restrict array, - const index_type * const restrict pdim, gfc_charlen_type string_len) + const index_type * const restrict pdim, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -62,6 +66,10 @@ maxloc1_8_s4 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -210,14 +218,15 @@ maxloc1_8_s4 (gfc_array_i8 * const restrict retarray, extern void mmaxloc1_8_s4 (gfc_array_i8 * const restrict, gfc_array_s4 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict, gfc_charlen_type); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(mmaxloc1_8_s4); void mmaxloc1_8_s4 (gfc_array_i8 * const restrict retarray, gfc_array_s4 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask, gfc_charlen_type string_len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -235,6 +244,9 @@ mmaxloc1_8_s4 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -411,14 +423,14 @@ mmaxloc1_8_s4 (gfc_array_i8 * const restrict retarray, extern void smaxloc1_8_s4 (gfc_array_i8 * const restrict, gfc_array_s4 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *, gfc_charlen_type); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(smaxloc1_8_s4); void smaxloc1_8_s4 (gfc_array_i8 * const restrict retarray, gfc_array_s4 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask, gfc_charlen_type string_len) + GFC_LOGICAL_4 * mask , GFC_LOGICAL_4 back, gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -431,7 +443,11 @@ smaxloc1_8_s4 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxloc1_8_s4 (retarray, array, pdim, back, string_len); +#else maxloc1_8_s4 (retarray, array, pdim, string_len); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxloc2_16_s1.c b/libgfortran/generated/maxloc2_16_s1.c index 1a4a886..bfba707 100644 --- a/libgfortran/generated/maxloc2_16_s1.c +++ b/libgfortran/generated/maxloc2_16_s1.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include <stdlib.h> #include <string.h> +#include <assert.h> #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_16) @@ -38,12 +39,12 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) return memcmp_char4 (a, b, n); } -extern GFC_INTEGER_16 maxloc2_16_s1 (gfc_array_s1 * const restrict, +extern GFC_INTEGER_16 maxloc2_16_s1 (gfc_array_s1 * const restrict, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(maxloc2_16_s1); GFC_INTEGER_16 -maxloc2_16_s1 (gfc_array_s1 * const restrict array, gfc_charlen_type len) +maxloc2_16_s1 (gfc_array_s1 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type ret; index_type sstride; @@ -52,6 +53,7 @@ maxloc2_16_s1 (gfc_array_s1 * const restrict array, gfc_charlen_type len) const GFC_INTEGER_1 *maxval; index_type i; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -74,12 +76,13 @@ maxloc2_16_s1 (gfc_array_s1 * const restrict array, gfc_charlen_type len) } extern GFC_INTEGER_16 mmaxloc2_16_s1 (gfc_array_s1 * const restrict, - gfc_array_l1 *const restrict mask, gfc_charlen_type); + gfc_array_l1 *const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type); export_proto(mmaxloc2_16_s1); GFC_INTEGER_16 mmaxloc2_16_s1 (gfc_array_s1 * const restrict array, - gfc_array_l1 * const restrict mask, + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type ret; @@ -92,6 +95,7 @@ mmaxloc2_16_s1 (gfc_array_s1 * const restrict array, int mask_kind; index_type mstride; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -141,15 +145,15 @@ mmaxloc2_16_s1 (gfc_array_s1 * const restrict array, } extern GFC_INTEGER_16 smaxloc2_16_s1 (gfc_array_s1 * const restrict, - GFC_LOGICAL_4 *mask, gfc_charlen_type); + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(smaxloc2_16_s1); GFC_INTEGER_16 smaxloc2_16_s1 (gfc_array_s1 * const restrict array, - GFC_LOGICAL_4 *mask, gfc_charlen_type len) + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { if (mask) - return maxloc2_16_s1 (array, len); + return maxloc2_16_s1 (array, len, back); else return 0; } diff --git a/libgfortran/generated/maxloc2_16_s4.c b/libgfortran/generated/maxloc2_16_s4.c index 31a6804..cf1235e 100644 --- a/libgfortran/generated/maxloc2_16_s4.c +++ b/libgfortran/generated/maxloc2_16_s4.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include <stdlib.h> #include <string.h> +#include <assert.h> #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_16) @@ -38,12 +39,12 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) return memcmp_char4 (a, b, n); } -extern GFC_INTEGER_16 maxloc2_16_s4 (gfc_array_s4 * const restrict, +extern GFC_INTEGER_16 maxloc2_16_s4 (gfc_array_s4 * const restrict, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(maxloc2_16_s4); GFC_INTEGER_16 -maxloc2_16_s4 (gfc_array_s4 * const restrict array, gfc_charlen_type len) +maxloc2_16_s4 (gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type ret; index_type sstride; @@ -52,6 +53,7 @@ maxloc2_16_s4 (gfc_array_s4 * const restrict array, gfc_charlen_type len) const GFC_INTEGER_4 *maxval; index_type i; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -74,12 +76,13 @@ maxloc2_16_s4 (gfc_array_s4 * const restrict array, gfc_charlen_type len) } extern GFC_INTEGER_16 mmaxloc2_16_s4 (gfc_array_s4 * const restrict, - gfc_array_l1 *const restrict mask, gfc_charlen_type); + gfc_array_l1 *const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type); export_proto(mmaxloc2_16_s4); GFC_INTEGER_16 mmaxloc2_16_s4 (gfc_array_s4 * const restrict array, - gfc_array_l1 * const restrict mask, + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type ret; @@ -92,6 +95,7 @@ mmaxloc2_16_s4 (gfc_array_s4 * const restrict array, int mask_kind; index_type mstride; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -141,15 +145,15 @@ mmaxloc2_16_s4 (gfc_array_s4 * const restrict array, } extern GFC_INTEGER_16 smaxloc2_16_s4 (gfc_array_s4 * const restrict, - GFC_LOGICAL_4 *mask, gfc_charlen_type); + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(smaxloc2_16_s4); GFC_INTEGER_16 smaxloc2_16_s4 (gfc_array_s4 * const restrict array, - GFC_LOGICAL_4 *mask, gfc_charlen_type len) + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { if (mask) - return maxloc2_16_s4 (array, len); + return maxloc2_16_s4 (array, len, back); else return 0; } diff --git a/libgfortran/generated/maxloc2_4_s1.c b/libgfortran/generated/maxloc2_4_s1.c index e68f50a..e88ecca 100644 --- a/libgfortran/generated/maxloc2_4_s1.c +++ b/libgfortran/generated/maxloc2_4_s1.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include <stdlib.h> #include <string.h> +#include <assert.h> #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_4) @@ -38,12 +39,12 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) return memcmp_char4 (a, b, n); } -extern GFC_INTEGER_4 maxloc2_4_s1 (gfc_array_s1 * const restrict, +extern GFC_INTEGER_4 maxloc2_4_s1 (gfc_array_s1 * const restrict, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(maxloc2_4_s1); GFC_INTEGER_4 -maxloc2_4_s1 (gfc_array_s1 * const restrict array, gfc_charlen_type len) +maxloc2_4_s1 (gfc_array_s1 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type ret; index_type sstride; @@ -52,6 +53,7 @@ maxloc2_4_s1 (gfc_array_s1 * const restrict array, gfc_charlen_type len) const GFC_INTEGER_1 *maxval; index_type i; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -74,12 +76,13 @@ maxloc2_4_s1 (gfc_array_s1 * const restrict array, gfc_charlen_type len) } extern GFC_INTEGER_4 mmaxloc2_4_s1 (gfc_array_s1 * const restrict, - gfc_array_l1 *const restrict mask, gfc_charlen_type); + gfc_array_l1 *const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type); export_proto(mmaxloc2_4_s1); GFC_INTEGER_4 mmaxloc2_4_s1 (gfc_array_s1 * const restrict array, - gfc_array_l1 * const restrict mask, + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type ret; @@ -92,6 +95,7 @@ mmaxloc2_4_s1 (gfc_array_s1 * const restrict array, int mask_kind; index_type mstride; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -141,15 +145,15 @@ mmaxloc2_4_s1 (gfc_array_s1 * const restrict array, } extern GFC_INTEGER_4 smaxloc2_4_s1 (gfc_array_s1 * const restrict, - GFC_LOGICAL_4 *mask, gfc_charlen_type); + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(smaxloc2_4_s1); GFC_INTEGER_4 smaxloc2_4_s1 (gfc_array_s1 * const restrict array, - GFC_LOGICAL_4 *mask, gfc_charlen_type len) + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { if (mask) - return maxloc2_4_s1 (array, len); + return maxloc2_4_s1 (array, len, back); else return 0; } diff --git a/libgfortran/generated/maxloc2_4_s4.c b/libgfortran/generated/maxloc2_4_s4.c index 104bfc6..adeba93 100644 --- a/libgfortran/generated/maxloc2_4_s4.c +++ b/libgfortran/generated/maxloc2_4_s4.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include <stdlib.h> #include <string.h> +#include <assert.h> #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4) @@ -38,12 +39,12 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) return memcmp_char4 (a, b, n); } -extern GFC_INTEGER_4 maxloc2_4_s4 (gfc_array_s4 * const restrict, +extern GFC_INTEGER_4 maxloc2_4_s4 (gfc_array_s4 * const restrict, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(maxloc2_4_s4); GFC_INTEGER_4 -maxloc2_4_s4 (gfc_array_s4 * const restrict array, gfc_charlen_type len) +maxloc2_4_s4 (gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type ret; index_type sstride; @@ -52,6 +53,7 @@ maxloc2_4_s4 (gfc_array_s4 * const restrict array, gfc_charlen_type len) const GFC_INTEGER_4 *maxval; index_type i; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -74,12 +76,13 @@ maxloc2_4_s4 (gfc_array_s4 * const restrict array, gfc_charlen_type len) } extern GFC_INTEGER_4 mmaxloc2_4_s4 (gfc_array_s4 * const restrict, - gfc_array_l1 *const restrict mask, gfc_charlen_type); + gfc_array_l1 *const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type); export_proto(mmaxloc2_4_s4); GFC_INTEGER_4 mmaxloc2_4_s4 (gfc_array_s4 * const restrict array, - gfc_array_l1 * const restrict mask, + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type ret; @@ -92,6 +95,7 @@ mmaxloc2_4_s4 (gfc_array_s4 * const restrict array, int mask_kind; index_type mstride; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -141,15 +145,15 @@ mmaxloc2_4_s4 (gfc_array_s4 * const restrict array, } extern GFC_INTEGER_4 smaxloc2_4_s4 (gfc_array_s4 * const restrict, - GFC_LOGICAL_4 *mask, gfc_charlen_type); + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(smaxloc2_4_s4); GFC_INTEGER_4 smaxloc2_4_s4 (gfc_array_s4 * const restrict array, - GFC_LOGICAL_4 *mask, gfc_charlen_type len) + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { if (mask) - return maxloc2_4_s4 (array, len); + return maxloc2_4_s4 (array, len, back); else return 0; } diff --git a/libgfortran/generated/maxloc2_8_s1.c b/libgfortran/generated/maxloc2_8_s1.c index 04c257ee..1a32e13 100644 --- a/libgfortran/generated/maxloc2_8_s1.c +++ b/libgfortran/generated/maxloc2_8_s1.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include <stdlib.h> #include <string.h> +#include <assert.h> #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_8) @@ -38,12 +39,12 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) return memcmp_char4 (a, b, n); } -extern GFC_INTEGER_8 maxloc2_8_s1 (gfc_array_s1 * const restrict, +extern GFC_INTEGER_8 maxloc2_8_s1 (gfc_array_s1 * const restrict, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(maxloc2_8_s1); GFC_INTEGER_8 -maxloc2_8_s1 (gfc_array_s1 * const restrict array, gfc_charlen_type len) +maxloc2_8_s1 (gfc_array_s1 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type ret; index_type sstride; @@ -52,6 +53,7 @@ maxloc2_8_s1 (gfc_array_s1 * const restrict array, gfc_charlen_type len) const GFC_INTEGER_1 *maxval; index_type i; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -74,12 +76,13 @@ maxloc2_8_s1 (gfc_array_s1 * const restrict array, gfc_charlen_type len) } extern GFC_INTEGER_8 mmaxloc2_8_s1 (gfc_array_s1 * const restrict, - gfc_array_l1 *const restrict mask, gfc_charlen_type); + gfc_array_l1 *const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type); export_proto(mmaxloc2_8_s1); GFC_INTEGER_8 mmaxloc2_8_s1 (gfc_array_s1 * const restrict array, - gfc_array_l1 * const restrict mask, + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type ret; @@ -92,6 +95,7 @@ mmaxloc2_8_s1 (gfc_array_s1 * const restrict array, int mask_kind; index_type mstride; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -141,15 +145,15 @@ mmaxloc2_8_s1 (gfc_array_s1 * const restrict array, } extern GFC_INTEGER_8 smaxloc2_8_s1 (gfc_array_s1 * const restrict, - GFC_LOGICAL_4 *mask, gfc_charlen_type); + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(smaxloc2_8_s1); GFC_INTEGER_8 smaxloc2_8_s1 (gfc_array_s1 * const restrict array, - GFC_LOGICAL_4 *mask, gfc_charlen_type len) + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { if (mask) - return maxloc2_8_s1 (array, len); + return maxloc2_8_s1 (array, len, back); else return 0; } diff --git a/libgfortran/generated/maxloc2_8_s4.c b/libgfortran/generated/maxloc2_8_s4.c index fe7de50..ae22a51 100644 --- a/libgfortran/generated/maxloc2_8_s4.c +++ b/libgfortran/generated/maxloc2_8_s4.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include <stdlib.h> #include <string.h> +#include <assert.h> #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_8) @@ -38,12 +39,12 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) return memcmp_char4 (a, b, n); } -extern GFC_INTEGER_8 maxloc2_8_s4 (gfc_array_s4 * const restrict, +extern GFC_INTEGER_8 maxloc2_8_s4 (gfc_array_s4 * const restrict, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(maxloc2_8_s4); GFC_INTEGER_8 -maxloc2_8_s4 (gfc_array_s4 * const restrict array, gfc_charlen_type len) +maxloc2_8_s4 (gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type ret; index_type sstride; @@ -52,6 +53,7 @@ maxloc2_8_s4 (gfc_array_s4 * const restrict array, gfc_charlen_type len) const GFC_INTEGER_4 *maxval; index_type i; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -74,12 +76,13 @@ maxloc2_8_s4 (gfc_array_s4 * const restrict array, gfc_charlen_type len) } extern GFC_INTEGER_8 mmaxloc2_8_s4 (gfc_array_s4 * const restrict, - gfc_array_l1 *const restrict mask, gfc_charlen_type); + gfc_array_l1 *const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type); export_proto(mmaxloc2_8_s4); GFC_INTEGER_8 mmaxloc2_8_s4 (gfc_array_s4 * const restrict array, - gfc_array_l1 * const restrict mask, + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type ret; @@ -92,6 +95,7 @@ mmaxloc2_8_s4 (gfc_array_s4 * const restrict array, int mask_kind; index_type mstride; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -141,15 +145,15 @@ mmaxloc2_8_s4 (gfc_array_s4 * const restrict array, } extern GFC_INTEGER_8 smaxloc2_8_s4 (gfc_array_s4 * const restrict, - GFC_LOGICAL_4 *mask, gfc_charlen_type); + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(smaxloc2_8_s4); GFC_INTEGER_8 smaxloc2_8_s4 (gfc_array_s4 * const restrict array, - GFC_LOGICAL_4 *mask, gfc_charlen_type len) + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { if (mask) - return maxloc2_8_s4 (array, len); + return maxloc2_8_s4 (array, len, back); else return 0; } diff --git a/libgfortran/generated/maxval_i1.c b/libgfortran/generated/maxval_i1.c index 88d80e1..2c6b865 100644 --- a/libgfortran/generated/maxval_i1.c +++ b/libgfortran/generated/maxval_i1.c @@ -51,6 +51,10 @@ maxval_i1 (gfc_array_i1 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -232,6 +236,9 @@ mmaxval_i1 (gfc_array_i1 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +448,11 @@ smaxval_i1 (gfc_array_i1 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxval_i1 (retarray, array, pdim, back); +#else maxval_i1 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxval_i16.c b/libgfortran/generated/maxval_i16.c index c555085..06046360 100644 --- a/libgfortran/generated/maxval_i16.c +++ b/libgfortran/generated/maxval_i16.c @@ -51,6 +51,10 @@ maxval_i16 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -232,6 +236,9 @@ mmaxval_i16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +448,11 @@ smaxval_i16 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxval_i16 (retarray, array, pdim, back); +#else maxval_i16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxval_i2.c b/libgfortran/generated/maxval_i2.c index 159ec96..bcd4343 100644 --- a/libgfortran/generated/maxval_i2.c +++ b/libgfortran/generated/maxval_i2.c @@ -51,6 +51,10 @@ maxval_i2 (gfc_array_i2 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -232,6 +236,9 @@ mmaxval_i2 (gfc_array_i2 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +448,11 @@ smaxval_i2 (gfc_array_i2 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxval_i2 (retarray, array, pdim, back); +#else maxval_i2 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxval_i4.c b/libgfortran/generated/maxval_i4.c index 70f8e90..bef1c29 100644 --- a/libgfortran/generated/maxval_i4.c +++ b/libgfortran/generated/maxval_i4.c @@ -51,6 +51,10 @@ maxval_i4 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -232,6 +236,9 @@ mmaxval_i4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +448,11 @@ smaxval_i4 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxval_i4 (retarray, array, pdim, back); +#else maxval_i4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxval_i8.c b/libgfortran/generated/maxval_i8.c index 49517bb..14deb70 100644 --- a/libgfortran/generated/maxval_i8.c +++ b/libgfortran/generated/maxval_i8.c @@ -51,6 +51,10 @@ maxval_i8 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -232,6 +236,9 @@ mmaxval_i8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +448,11 @@ smaxval_i8 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxval_i8 (retarray, array, pdim, back); +#else maxval_i8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxval_r10.c b/libgfortran/generated/maxval_r10.c index 683a6f9..85d6d83 100644 --- a/libgfortran/generated/maxval_r10.c +++ b/libgfortran/generated/maxval_r10.c @@ -51,6 +51,10 @@ maxval_r10 (gfc_array_r10 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -232,6 +236,9 @@ mmaxval_r10 (gfc_array_r10 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +448,11 @@ smaxval_r10 (gfc_array_r10 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxval_r10 (retarray, array, pdim, back); +#else maxval_r10 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxval_r16.c b/libgfortran/generated/maxval_r16.c index 1eaae8c..18ef367 100644 --- a/libgfortran/generated/maxval_r16.c +++ b/libgfortran/generated/maxval_r16.c @@ -51,6 +51,10 @@ maxval_r16 (gfc_array_r16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -232,6 +236,9 @@ mmaxval_r16 (gfc_array_r16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +448,11 @@ smaxval_r16 (gfc_array_r16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxval_r16 (retarray, array, pdim, back); +#else maxval_r16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxval_r4.c b/libgfortran/generated/maxval_r4.c index 72ac583..862fe63 100644 --- a/libgfortran/generated/maxval_r4.c +++ b/libgfortran/generated/maxval_r4.c @@ -51,6 +51,10 @@ maxval_r4 (gfc_array_r4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -232,6 +236,9 @@ mmaxval_r4 (gfc_array_r4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +448,11 @@ smaxval_r4 (gfc_array_r4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxval_r4 (retarray, array, pdim, back); +#else maxval_r4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/maxval_r8.c b/libgfortran/generated/maxval_r8.c index de58c87..9315483 100644 --- a/libgfortran/generated/maxval_r8.c +++ b/libgfortran/generated/maxval_r8.c @@ -51,6 +51,10 @@ maxval_r8 (gfc_array_r8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -232,6 +236,9 @@ mmaxval_r8 (gfc_array_r8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +448,11 @@ smaxval_r8 (gfc_array_r8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + maxval_r8 (retarray, array, pdim, back); +#else maxval_r8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc0_16_i1.c b/libgfortran/generated/minloc0_16_i1.c index c958fdc..88720df 100644 --- a/libgfortran/generated/minloc0_16_i1.c +++ b/libgfortran/generated/minloc0_16_i1.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_16) extern void minloc0_16_i1 (gfc_array_i16 * const restrict retarray, - gfc_array_i1 * const restrict array); + gfc_array_i1 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_16_i1); void minloc0_16_i1 (gfc_array_i16 * const restrict retarray, - gfc_array_i1 * const restrict array) + gfc_array_i1 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_16_i1 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_16_i1 (gfc_array_i16 * const restrict retarray, extern void mminloc0_16_i1 (gfc_array_i16 * const restrict, - gfc_array_i1 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i1 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_16_i1); void mminloc0_16_i1 (gfc_array_i16 * const restrict retarray, gfc_array_i1 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_16_i1 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_16_i1 (gfc_array_i16 * const restrict retarray, extern void sminloc0_16_i1 (gfc_array_i16 * const restrict, - gfc_array_i1 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i1 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_16_i1); void sminloc0_16_i1 (gfc_array_i16 * const restrict retarray, gfc_array_i1 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_16_i1 (gfc_array_i16 * const restrict retarray, if (*mask) { - minloc0_16_i1 (retarray, array); + minloc0_16_i1 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_16_i16.c b/libgfortran/generated/minloc0_16_i16.c index 82c86b5..4e2b6d0 100644 --- a/libgfortran/generated/minloc0_16_i16.c +++ b/libgfortran/generated/minloc0_16_i16.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_INTEGER_16) extern void minloc0_16_i16 (gfc_array_i16 * const restrict retarray, - gfc_array_i16 * const restrict array); + gfc_array_i16 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_16_i16); void minloc0_16_i16 (gfc_array_i16 * const restrict retarray, - gfc_array_i16 * const restrict array) + gfc_array_i16 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_16_i16 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_16_i16 (gfc_array_i16 * const restrict retarray, extern void mminloc0_16_i16 (gfc_array_i16 * const restrict, - gfc_array_i16 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i16 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_16_i16); void mminloc0_16_i16 (gfc_array_i16 * const restrict retarray, gfc_array_i16 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_16_i16 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_16_i16 (gfc_array_i16 * const restrict retarray, extern void sminloc0_16_i16 (gfc_array_i16 * const restrict, - gfc_array_i16 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i16 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_16_i16); void sminloc0_16_i16 (gfc_array_i16 * const restrict retarray, gfc_array_i16 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_16_i16 (gfc_array_i16 * const restrict retarray, if (*mask) { - minloc0_16_i16 (retarray, array); + minloc0_16_i16 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_16_i2.c b/libgfortran/generated/minloc0_16_i2.c index b32d560..c9032c7 100644 --- a/libgfortran/generated/minloc0_16_i2.c +++ b/libgfortran/generated/minloc0_16_i2.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_2) && defined (HAVE_GFC_INTEGER_16) extern void minloc0_16_i2 (gfc_array_i16 * const restrict retarray, - gfc_array_i2 * const restrict array); + gfc_array_i2 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_16_i2); void minloc0_16_i2 (gfc_array_i16 * const restrict retarray, - gfc_array_i2 * const restrict array) + gfc_array_i2 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_16_i2 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_16_i2 (gfc_array_i16 * const restrict retarray, extern void mminloc0_16_i2 (gfc_array_i16 * const restrict, - gfc_array_i2 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i2 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_16_i2); void mminloc0_16_i2 (gfc_array_i16 * const restrict retarray, gfc_array_i2 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_16_i2 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_16_i2 (gfc_array_i16 * const restrict retarray, extern void sminloc0_16_i2 (gfc_array_i16 * const restrict, - gfc_array_i2 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i2 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_16_i2); void sminloc0_16_i2 (gfc_array_i16 * const restrict retarray, gfc_array_i2 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_16_i2 (gfc_array_i16 * const restrict retarray, if (*mask) { - minloc0_16_i2 (retarray, array); + minloc0_16_i2 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_16_i4.c b/libgfortran/generated/minloc0_16_i4.c index 977bbb6..a27405a 100644 --- a/libgfortran/generated/minloc0_16_i4.c +++ b/libgfortran/generated/minloc0_16_i4.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_16) extern void minloc0_16_i4 (gfc_array_i16 * const restrict retarray, - gfc_array_i4 * const restrict array); + gfc_array_i4 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_16_i4); void minloc0_16_i4 (gfc_array_i16 * const restrict retarray, - gfc_array_i4 * const restrict array) + gfc_array_i4 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_16_i4 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_16_i4 (gfc_array_i16 * const restrict retarray, extern void mminloc0_16_i4 (gfc_array_i16 * const restrict, - gfc_array_i4 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i4 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_16_i4); void mminloc0_16_i4 (gfc_array_i16 * const restrict retarray, gfc_array_i4 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_16_i4 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_16_i4 (gfc_array_i16 * const restrict retarray, extern void sminloc0_16_i4 (gfc_array_i16 * const restrict, - gfc_array_i4 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i4 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_16_i4); void sminloc0_16_i4 (gfc_array_i16 * const restrict retarray, gfc_array_i4 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_16_i4 (gfc_array_i16 * const restrict retarray, if (*mask) { - minloc0_16_i4 (retarray, array); + minloc0_16_i4 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_16_i8.c b/libgfortran/generated/minloc0_16_i8.c index a55c97e..6874f66 100644 --- a/libgfortran/generated/minloc0_16_i8.c +++ b/libgfortran/generated/minloc0_16_i8.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_INTEGER_16) extern void minloc0_16_i8 (gfc_array_i16 * const restrict retarray, - gfc_array_i8 * const restrict array); + gfc_array_i8 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_16_i8); void minloc0_16_i8 (gfc_array_i16 * const restrict retarray, - gfc_array_i8 * const restrict array) + gfc_array_i8 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_16_i8 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_16_i8 (gfc_array_i16 * const restrict retarray, extern void mminloc0_16_i8 (gfc_array_i16 * const restrict, - gfc_array_i8 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i8 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_16_i8); void mminloc0_16_i8 (gfc_array_i16 * const restrict retarray, gfc_array_i8 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_16_i8 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_16_i8 (gfc_array_i16 * const restrict retarray, extern void sminloc0_16_i8 (gfc_array_i16 * const restrict, - gfc_array_i8 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i8 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_16_i8); void sminloc0_16_i8 (gfc_array_i16 * const restrict retarray, gfc_array_i8 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_16_i8 (gfc_array_i16 * const restrict retarray, if (*mask) { - minloc0_16_i8 (retarray, array); + minloc0_16_i8 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_16_r10.c b/libgfortran/generated/minloc0_16_r10.c index 594e433..ad97459 100644 --- a/libgfortran/generated/minloc0_16_r10.c +++ b/libgfortran/generated/minloc0_16_r10.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_10) && defined (HAVE_GFC_INTEGER_16) extern void minloc0_16_r10 (gfc_array_i16 * const restrict retarray, - gfc_array_r10 * const restrict array); + gfc_array_r10 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_16_r10); void minloc0_16_r10 (gfc_array_i16 * const restrict retarray, - gfc_array_r10 * const restrict array) + gfc_array_r10 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_16_r10 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_16_r10 (gfc_array_i16 * const restrict retarray, extern void mminloc0_16_r10 (gfc_array_i16 * const restrict, - gfc_array_r10 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r10 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_16_r10); void mminloc0_16_r10 (gfc_array_i16 * const restrict retarray, gfc_array_r10 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_16_r10 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_16_r10 (gfc_array_i16 * const restrict retarray, extern void sminloc0_16_r10 (gfc_array_i16 * const restrict, - gfc_array_r10 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r10 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_16_r10); void sminloc0_16_r10 (gfc_array_i16 * const restrict retarray, gfc_array_r10 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_16_r10 (gfc_array_i16 * const restrict retarray, if (*mask) { - minloc0_16_r10 (retarray, array); + minloc0_16_r10 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_16_r16.c b/libgfortran/generated/minloc0_16_r16.c index 22bf131..f8245ed 100644 --- a/libgfortran/generated/minloc0_16_r16.c +++ b/libgfortran/generated/minloc0_16_r16.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_16) && defined (HAVE_GFC_INTEGER_16) extern void minloc0_16_r16 (gfc_array_i16 * const restrict retarray, - gfc_array_r16 * const restrict array); + gfc_array_r16 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_16_r16); void minloc0_16_r16 (gfc_array_i16 * const restrict retarray, - gfc_array_r16 * const restrict array) + gfc_array_r16 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_16_r16 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_16_r16 (gfc_array_i16 * const restrict retarray, extern void mminloc0_16_r16 (gfc_array_i16 * const restrict, - gfc_array_r16 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r16 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_16_r16); void mminloc0_16_r16 (gfc_array_i16 * const restrict retarray, gfc_array_r16 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_16_r16 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_16_r16 (gfc_array_i16 * const restrict retarray, extern void sminloc0_16_r16 (gfc_array_i16 * const restrict, - gfc_array_r16 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r16 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_16_r16); void sminloc0_16_r16 (gfc_array_i16 * const restrict retarray, gfc_array_r16 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_16_r16 (gfc_array_i16 * const restrict retarray, if (*mask) { - minloc0_16_r16 (retarray, array); + minloc0_16_r16 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_16_r4.c b/libgfortran/generated/minloc0_16_r4.c index f7b8e9e..ed41783 100644 --- a/libgfortran/generated/minloc0_16_r4.c +++ b/libgfortran/generated/minloc0_16_r4.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_4) && defined (HAVE_GFC_INTEGER_16) extern void minloc0_16_r4 (gfc_array_i16 * const restrict retarray, - gfc_array_r4 * const restrict array); + gfc_array_r4 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_16_r4); void minloc0_16_r4 (gfc_array_i16 * const restrict retarray, - gfc_array_r4 * const restrict array) + gfc_array_r4 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_16_r4 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_16_r4 (gfc_array_i16 * const restrict retarray, extern void mminloc0_16_r4 (gfc_array_i16 * const restrict, - gfc_array_r4 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r4 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_16_r4); void mminloc0_16_r4 (gfc_array_i16 * const restrict retarray, gfc_array_r4 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_16_r4 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_16_r4 (gfc_array_i16 * const restrict retarray, extern void sminloc0_16_r4 (gfc_array_i16 * const restrict, - gfc_array_r4 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r4 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_16_r4); void sminloc0_16_r4 (gfc_array_i16 * const restrict retarray, gfc_array_r4 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_16_r4 (gfc_array_i16 * const restrict retarray, if (*mask) { - minloc0_16_r4 (retarray, array); + minloc0_16_r4 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_16_r8.c b/libgfortran/generated/minloc0_16_r8.c index 3be2ea9..0799d4d 100644 --- a/libgfortran/generated/minloc0_16_r8.c +++ b/libgfortran/generated/minloc0_16_r8.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_8) && defined (HAVE_GFC_INTEGER_16) extern void minloc0_16_r8 (gfc_array_i16 * const restrict retarray, - gfc_array_r8 * const restrict array); + gfc_array_r8 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_16_r8); void minloc0_16_r8 (gfc_array_i16 * const restrict retarray, - gfc_array_r8 * const restrict array) + gfc_array_r8 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_16_r8 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_16_r8 (gfc_array_i16 * const restrict retarray, extern void mminloc0_16_r8 (gfc_array_i16 * const restrict, - gfc_array_r8 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r8 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_16_r8); void mminloc0_16_r8 (gfc_array_i16 * const restrict retarray, gfc_array_r8 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_16_r8 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_16_r8 (gfc_array_i16 * const restrict retarray, extern void sminloc0_16_r8 (gfc_array_i16 * const restrict, - gfc_array_r8 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r8 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_16_r8); void sminloc0_16_r8 (gfc_array_i16 * const restrict retarray, gfc_array_r8 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_16_r8 (gfc_array_i16 * const restrict retarray, if (*mask) { - minloc0_16_r8 (retarray, array); + minloc0_16_r8 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_16_s1.c b/libgfortran/generated/minloc0_16_s1.c index 524d27d..e566d74 100644 --- a/libgfortran/generated/minloc0_16_s1.c +++ b/libgfortran/generated/minloc0_16_s1.c @@ -32,6 +32,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + static inline int compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) { @@ -43,12 +45,12 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) } extern void minloc0_16_s1 (gfc_array_i16 * const restrict retarray, - gfc_array_s1 * const restrict array, gfc_charlen_type len); + gfc_array_s1 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len); export_proto(minloc0_16_s1); void minloc0_16_s1 (gfc_array_i16 * const restrict retarray, - gfc_array_s1 * const restrict array, gfc_charlen_type len) + gfc_array_s1 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -59,6 +61,10 @@ minloc0_16_s1 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -149,13 +155,15 @@ minloc0_16_s1 (gfc_array_i16 * const restrict retarray, extern void mminloc0_16_s1 (gfc_array_i16 * const restrict, - gfc_array_s1 * const restrict, gfc_array_l1 * const restrict, gfc_charlen_type len); + gfc_array_s1 * const restrict, gfc_array_l1 * const restrict , GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(mminloc0_16_s1); void mminloc0_16_s1 (gfc_array_i16 * const restrict retarray, gfc_array_s1 * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -169,6 +177,9 @@ mminloc0_16_s1 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -282,13 +293,15 @@ mminloc0_16_s1 (gfc_array_i16 * const restrict retarray, extern void sminloc0_16_s1 (gfc_array_i16 * const restrict, - gfc_array_s1 * const restrict, GFC_LOGICAL_4 *, gfc_charlen_type len); + gfc_array_s1 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(sminloc0_16_s1); void sminloc0_16_s1 (gfc_array_i16 * const restrict retarray, gfc_array_s1 * const restrict array, - GFC_LOGICAL_4 * mask, gfc_charlen_type len) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type rank; index_type dstride; @@ -297,7 +310,11 @@ sminloc0_16_s1 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc0_16_s1 (retarray, array, back, len); +#else minloc0_16_s1 (retarray, array, len); +#endif return; } diff --git a/libgfortran/generated/minloc0_16_s4.c b/libgfortran/generated/minloc0_16_s4.c index 736eaa3..2a0b13c 100644 --- a/libgfortran/generated/minloc0_16_s4.c +++ b/libgfortran/generated/minloc0_16_s4.c @@ -32,6 +32,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + static inline int compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) { @@ -43,12 +45,12 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) } extern void minloc0_16_s4 (gfc_array_i16 * const restrict retarray, - gfc_array_s4 * const restrict array, gfc_charlen_type len); + gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len); export_proto(minloc0_16_s4); void minloc0_16_s4 (gfc_array_i16 * const restrict retarray, - gfc_array_s4 * const restrict array, gfc_charlen_type len) + gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -59,6 +61,10 @@ minloc0_16_s4 (gfc_array_i16 * const restrict retarray, index_type rank; index_type n; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -149,13 +155,15 @@ minloc0_16_s4 (gfc_array_i16 * const restrict retarray, extern void mminloc0_16_s4 (gfc_array_i16 * const restrict, - gfc_array_s4 * const restrict, gfc_array_l1 * const restrict, gfc_charlen_type len); + gfc_array_s4 * const restrict, gfc_array_l1 * const restrict , GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(mminloc0_16_s4); void mminloc0_16_s4 (gfc_array_i16 * const restrict retarray, gfc_array_s4 * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -169,6 +177,9 @@ mminloc0_16_s4 (gfc_array_i16 * const restrict retarray, index_type n; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -282,13 +293,15 @@ mminloc0_16_s4 (gfc_array_i16 * const restrict retarray, extern void sminloc0_16_s4 (gfc_array_i16 * const restrict, - gfc_array_s4 * const restrict, GFC_LOGICAL_4 *, gfc_charlen_type len); + gfc_array_s4 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(sminloc0_16_s4); void sminloc0_16_s4 (gfc_array_i16 * const restrict retarray, gfc_array_s4 * const restrict array, - GFC_LOGICAL_4 * mask, gfc_charlen_type len) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type rank; index_type dstride; @@ -297,7 +310,11 @@ sminloc0_16_s4 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc0_16_s4 (retarray, array, back, len); +#else minloc0_16_s4 (retarray, array, len); +#endif return; } diff --git a/libgfortran/generated/minloc0_4_i1.c b/libgfortran/generated/minloc0_4_i1.c index acfbb91..577c9dd 100644 --- a/libgfortran/generated/minloc0_4_i1.c +++ b/libgfortran/generated/minloc0_4_i1.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_4) extern void minloc0_4_i1 (gfc_array_i4 * const restrict retarray, - gfc_array_i1 * const restrict array); + gfc_array_i1 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_4_i1); void minloc0_4_i1 (gfc_array_i4 * const restrict retarray, - gfc_array_i1 * const restrict array) + gfc_array_i1 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_4_i1 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_4_i1 (gfc_array_i4 * const restrict retarray, extern void mminloc0_4_i1 (gfc_array_i4 * const restrict, - gfc_array_i1 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i1 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_4_i1); void mminloc0_4_i1 (gfc_array_i4 * const restrict retarray, gfc_array_i1 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_4_i1 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_4_i1 (gfc_array_i4 * const restrict retarray, extern void sminloc0_4_i1 (gfc_array_i4 * const restrict, - gfc_array_i1 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i1 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_4_i1); void sminloc0_4_i1 (gfc_array_i4 * const restrict retarray, gfc_array_i1 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_4_i1 (gfc_array_i4 * const restrict retarray, if (*mask) { - minloc0_4_i1 (retarray, array); + minloc0_4_i1 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_4_i16.c b/libgfortran/generated/minloc0_4_i16.c index a47b20e..48da69e 100644 --- a/libgfortran/generated/minloc0_4_i16.c +++ b/libgfortran/generated/minloc0_4_i16.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_INTEGER_4) extern void minloc0_4_i16 (gfc_array_i4 * const restrict retarray, - gfc_array_i16 * const restrict array); + gfc_array_i16 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_4_i16); void minloc0_4_i16 (gfc_array_i4 * const restrict retarray, - gfc_array_i16 * const restrict array) + gfc_array_i16 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_4_i16 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_4_i16 (gfc_array_i4 * const restrict retarray, extern void mminloc0_4_i16 (gfc_array_i4 * const restrict, - gfc_array_i16 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i16 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_4_i16); void mminloc0_4_i16 (gfc_array_i4 * const restrict retarray, gfc_array_i16 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_4_i16 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_4_i16 (gfc_array_i4 * const restrict retarray, extern void sminloc0_4_i16 (gfc_array_i4 * const restrict, - gfc_array_i16 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i16 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_4_i16); void sminloc0_4_i16 (gfc_array_i4 * const restrict retarray, gfc_array_i16 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_4_i16 (gfc_array_i4 * const restrict retarray, if (*mask) { - minloc0_4_i16 (retarray, array); + minloc0_4_i16 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_4_i2.c b/libgfortran/generated/minloc0_4_i2.c index 8b378ba..815ea85 100644 --- a/libgfortran/generated/minloc0_4_i2.c +++ b/libgfortran/generated/minloc0_4_i2.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_2) && defined (HAVE_GFC_INTEGER_4) extern void minloc0_4_i2 (gfc_array_i4 * const restrict retarray, - gfc_array_i2 * const restrict array); + gfc_array_i2 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_4_i2); void minloc0_4_i2 (gfc_array_i4 * const restrict retarray, - gfc_array_i2 * const restrict array) + gfc_array_i2 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_4_i2 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_4_i2 (gfc_array_i4 * const restrict retarray, extern void mminloc0_4_i2 (gfc_array_i4 * const restrict, - gfc_array_i2 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i2 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_4_i2); void mminloc0_4_i2 (gfc_array_i4 * const restrict retarray, gfc_array_i2 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_4_i2 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_4_i2 (gfc_array_i4 * const restrict retarray, extern void sminloc0_4_i2 (gfc_array_i4 * const restrict, - gfc_array_i2 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i2 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_4_i2); void sminloc0_4_i2 (gfc_array_i4 * const restrict retarray, gfc_array_i2 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_4_i2 (gfc_array_i4 * const restrict retarray, if (*mask) { - minloc0_4_i2 (retarray, array); + minloc0_4_i2 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_4_i4.c b/libgfortran/generated/minloc0_4_i4.c index b91d2bf..36b0a58 100644 --- a/libgfortran/generated/minloc0_4_i4.c +++ b/libgfortran/generated/minloc0_4_i4.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4) extern void minloc0_4_i4 (gfc_array_i4 * const restrict retarray, - gfc_array_i4 * const restrict array); + gfc_array_i4 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_4_i4); void minloc0_4_i4 (gfc_array_i4 * const restrict retarray, - gfc_array_i4 * const restrict array) + gfc_array_i4 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_4_i4 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_4_i4 (gfc_array_i4 * const restrict retarray, extern void mminloc0_4_i4 (gfc_array_i4 * const restrict, - gfc_array_i4 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i4 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_4_i4); void mminloc0_4_i4 (gfc_array_i4 * const restrict retarray, gfc_array_i4 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_4_i4 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_4_i4 (gfc_array_i4 * const restrict retarray, extern void sminloc0_4_i4 (gfc_array_i4 * const restrict, - gfc_array_i4 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i4 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_4_i4); void sminloc0_4_i4 (gfc_array_i4 * const restrict retarray, gfc_array_i4 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_4_i4 (gfc_array_i4 * const restrict retarray, if (*mask) { - minloc0_4_i4 (retarray, array); + minloc0_4_i4 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_4_i8.c b/libgfortran/generated/minloc0_4_i8.c index ee87eaa..a66280c 100644 --- a/libgfortran/generated/minloc0_4_i8.c +++ b/libgfortran/generated/minloc0_4_i8.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_INTEGER_4) extern void minloc0_4_i8 (gfc_array_i4 * const restrict retarray, - gfc_array_i8 * const restrict array); + gfc_array_i8 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_4_i8); void minloc0_4_i8 (gfc_array_i4 * const restrict retarray, - gfc_array_i8 * const restrict array) + gfc_array_i8 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_4_i8 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_4_i8 (gfc_array_i4 * const restrict retarray, extern void mminloc0_4_i8 (gfc_array_i4 * const restrict, - gfc_array_i8 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i8 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_4_i8); void mminloc0_4_i8 (gfc_array_i4 * const restrict retarray, gfc_array_i8 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_4_i8 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_4_i8 (gfc_array_i4 * const restrict retarray, extern void sminloc0_4_i8 (gfc_array_i4 * const restrict, - gfc_array_i8 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i8 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_4_i8); void sminloc0_4_i8 (gfc_array_i4 * const restrict retarray, gfc_array_i8 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_4_i8 (gfc_array_i4 * const restrict retarray, if (*mask) { - minloc0_4_i8 (retarray, array); + minloc0_4_i8 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_4_r10.c b/libgfortran/generated/minloc0_4_r10.c index 9d39606..461ad0d 100644 --- a/libgfortran/generated/minloc0_4_r10.c +++ b/libgfortran/generated/minloc0_4_r10.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_10) && defined (HAVE_GFC_INTEGER_4) extern void minloc0_4_r10 (gfc_array_i4 * const restrict retarray, - gfc_array_r10 * const restrict array); + gfc_array_r10 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_4_r10); void minloc0_4_r10 (gfc_array_i4 * const restrict retarray, - gfc_array_r10 * const restrict array) + gfc_array_r10 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_4_r10 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_4_r10 (gfc_array_i4 * const restrict retarray, extern void mminloc0_4_r10 (gfc_array_i4 * const restrict, - gfc_array_r10 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r10 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_4_r10); void mminloc0_4_r10 (gfc_array_i4 * const restrict retarray, gfc_array_r10 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_4_r10 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_4_r10 (gfc_array_i4 * const restrict retarray, extern void sminloc0_4_r10 (gfc_array_i4 * const restrict, - gfc_array_r10 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r10 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_4_r10); void sminloc0_4_r10 (gfc_array_i4 * const restrict retarray, gfc_array_r10 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_4_r10 (gfc_array_i4 * const restrict retarray, if (*mask) { - minloc0_4_r10 (retarray, array); + minloc0_4_r10 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_4_r16.c b/libgfortran/generated/minloc0_4_r16.c index be920c3..27e6d1d 100644 --- a/libgfortran/generated/minloc0_4_r16.c +++ b/libgfortran/generated/minloc0_4_r16.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_16) && defined (HAVE_GFC_INTEGER_4) extern void minloc0_4_r16 (gfc_array_i4 * const restrict retarray, - gfc_array_r16 * const restrict array); + gfc_array_r16 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_4_r16); void minloc0_4_r16 (gfc_array_i4 * const restrict retarray, - gfc_array_r16 * const restrict array) + gfc_array_r16 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_4_r16 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_4_r16 (gfc_array_i4 * const restrict retarray, extern void mminloc0_4_r16 (gfc_array_i4 * const restrict, - gfc_array_r16 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r16 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_4_r16); void mminloc0_4_r16 (gfc_array_i4 * const restrict retarray, gfc_array_r16 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_4_r16 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_4_r16 (gfc_array_i4 * const restrict retarray, extern void sminloc0_4_r16 (gfc_array_i4 * const restrict, - gfc_array_r16 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r16 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_4_r16); void sminloc0_4_r16 (gfc_array_i4 * const restrict retarray, gfc_array_r16 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_4_r16 (gfc_array_i4 * const restrict retarray, if (*mask) { - minloc0_4_r16 (retarray, array); + minloc0_4_r16 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_4_r4.c b/libgfortran/generated/minloc0_4_r4.c index f5beb64..1b85544 100644 --- a/libgfortran/generated/minloc0_4_r4.c +++ b/libgfortran/generated/minloc0_4_r4.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_4) && defined (HAVE_GFC_INTEGER_4) extern void minloc0_4_r4 (gfc_array_i4 * const restrict retarray, - gfc_array_r4 * const restrict array); + gfc_array_r4 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_4_r4); void minloc0_4_r4 (gfc_array_i4 * const restrict retarray, - gfc_array_r4 * const restrict array) + gfc_array_r4 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_4_r4 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_4_r4 (gfc_array_i4 * const restrict retarray, extern void mminloc0_4_r4 (gfc_array_i4 * const restrict, - gfc_array_r4 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r4 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_4_r4); void mminloc0_4_r4 (gfc_array_i4 * const restrict retarray, gfc_array_r4 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_4_r4 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_4_r4 (gfc_array_i4 * const restrict retarray, extern void sminloc0_4_r4 (gfc_array_i4 * const restrict, - gfc_array_r4 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r4 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_4_r4); void sminloc0_4_r4 (gfc_array_i4 * const restrict retarray, gfc_array_r4 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_4_r4 (gfc_array_i4 * const restrict retarray, if (*mask) { - minloc0_4_r4 (retarray, array); + minloc0_4_r4 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_4_r8.c b/libgfortran/generated/minloc0_4_r8.c index 2f6973c..7c6d6bfb 100644 --- a/libgfortran/generated/minloc0_4_r8.c +++ b/libgfortran/generated/minloc0_4_r8.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_8) && defined (HAVE_GFC_INTEGER_4) extern void minloc0_4_r8 (gfc_array_i4 * const restrict retarray, - gfc_array_r8 * const restrict array); + gfc_array_r8 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_4_r8); void minloc0_4_r8 (gfc_array_i4 * const restrict retarray, - gfc_array_r8 * const restrict array) + gfc_array_r8 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_4_r8 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_4_r8 (gfc_array_i4 * const restrict retarray, extern void mminloc0_4_r8 (gfc_array_i4 * const restrict, - gfc_array_r8 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r8 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_4_r8); void mminloc0_4_r8 (gfc_array_i4 * const restrict retarray, gfc_array_r8 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_4_r8 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_4_r8 (gfc_array_i4 * const restrict retarray, extern void sminloc0_4_r8 (gfc_array_i4 * const restrict, - gfc_array_r8 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r8 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_4_r8); void sminloc0_4_r8 (gfc_array_i4 * const restrict retarray, gfc_array_r8 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_4_r8 (gfc_array_i4 * const restrict retarray, if (*mask) { - minloc0_4_r8 (retarray, array); + minloc0_4_r8 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_4_s1.c b/libgfortran/generated/minloc0_4_s1.c index 111ee09..4d58df4 100644 --- a/libgfortran/generated/minloc0_4_s1.c +++ b/libgfortran/generated/minloc0_4_s1.c @@ -32,6 +32,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + static inline int compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) { @@ -43,12 +45,12 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) } extern void minloc0_4_s1 (gfc_array_i4 * const restrict retarray, - gfc_array_s1 * const restrict array, gfc_charlen_type len); + gfc_array_s1 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len); export_proto(minloc0_4_s1); void minloc0_4_s1 (gfc_array_i4 * const restrict retarray, - gfc_array_s1 * const restrict array, gfc_charlen_type len) + gfc_array_s1 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -59,6 +61,10 @@ minloc0_4_s1 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -149,13 +155,15 @@ minloc0_4_s1 (gfc_array_i4 * const restrict retarray, extern void mminloc0_4_s1 (gfc_array_i4 * const restrict, - gfc_array_s1 * const restrict, gfc_array_l1 * const restrict, gfc_charlen_type len); + gfc_array_s1 * const restrict, gfc_array_l1 * const restrict , GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(mminloc0_4_s1); void mminloc0_4_s1 (gfc_array_i4 * const restrict retarray, gfc_array_s1 * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -169,6 +177,9 @@ mminloc0_4_s1 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -282,13 +293,15 @@ mminloc0_4_s1 (gfc_array_i4 * const restrict retarray, extern void sminloc0_4_s1 (gfc_array_i4 * const restrict, - gfc_array_s1 * const restrict, GFC_LOGICAL_4 *, gfc_charlen_type len); + gfc_array_s1 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(sminloc0_4_s1); void sminloc0_4_s1 (gfc_array_i4 * const restrict retarray, gfc_array_s1 * const restrict array, - GFC_LOGICAL_4 * mask, gfc_charlen_type len) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type rank; index_type dstride; @@ -297,7 +310,11 @@ sminloc0_4_s1 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc0_4_s1 (retarray, array, back, len); +#else minloc0_4_s1 (retarray, array, len); +#endif return; } diff --git a/libgfortran/generated/minloc0_4_s4.c b/libgfortran/generated/minloc0_4_s4.c index d5379df..bea56c0 100644 --- a/libgfortran/generated/minloc0_4_s4.c +++ b/libgfortran/generated/minloc0_4_s4.c @@ -32,6 +32,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + static inline int compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) { @@ -43,12 +45,12 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) } extern void minloc0_4_s4 (gfc_array_i4 * const restrict retarray, - gfc_array_s4 * const restrict array, gfc_charlen_type len); + gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len); export_proto(minloc0_4_s4); void minloc0_4_s4 (gfc_array_i4 * const restrict retarray, - gfc_array_s4 * const restrict array, gfc_charlen_type len) + gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -59,6 +61,10 @@ minloc0_4_s4 (gfc_array_i4 * const restrict retarray, index_type rank; index_type n; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -149,13 +155,15 @@ minloc0_4_s4 (gfc_array_i4 * const restrict retarray, extern void mminloc0_4_s4 (gfc_array_i4 * const restrict, - gfc_array_s4 * const restrict, gfc_array_l1 * const restrict, gfc_charlen_type len); + gfc_array_s4 * const restrict, gfc_array_l1 * const restrict , GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(mminloc0_4_s4); void mminloc0_4_s4 (gfc_array_i4 * const restrict retarray, gfc_array_s4 * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -169,6 +177,9 @@ mminloc0_4_s4 (gfc_array_i4 * const restrict retarray, index_type n; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -282,13 +293,15 @@ mminloc0_4_s4 (gfc_array_i4 * const restrict retarray, extern void sminloc0_4_s4 (gfc_array_i4 * const restrict, - gfc_array_s4 * const restrict, GFC_LOGICAL_4 *, gfc_charlen_type len); + gfc_array_s4 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(sminloc0_4_s4); void sminloc0_4_s4 (gfc_array_i4 * const restrict retarray, gfc_array_s4 * const restrict array, - GFC_LOGICAL_4 * mask, gfc_charlen_type len) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type rank; index_type dstride; @@ -297,7 +310,11 @@ sminloc0_4_s4 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc0_4_s4 (retarray, array, back, len); +#else minloc0_4_s4 (retarray, array, len); +#endif return; } diff --git a/libgfortran/generated/minloc0_8_i1.c b/libgfortran/generated/minloc0_8_i1.c index cf7f5c1..b0bccc8 100644 --- a/libgfortran/generated/minloc0_8_i1.c +++ b/libgfortran/generated/minloc0_8_i1.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_8) extern void minloc0_8_i1 (gfc_array_i8 * const restrict retarray, - gfc_array_i1 * const restrict array); + gfc_array_i1 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_8_i1); void minloc0_8_i1 (gfc_array_i8 * const restrict retarray, - gfc_array_i1 * const restrict array) + gfc_array_i1 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_8_i1 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_8_i1 (gfc_array_i8 * const restrict retarray, extern void mminloc0_8_i1 (gfc_array_i8 * const restrict, - gfc_array_i1 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i1 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_8_i1); void mminloc0_8_i1 (gfc_array_i8 * const restrict retarray, gfc_array_i1 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_8_i1 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_8_i1 (gfc_array_i8 * const restrict retarray, extern void sminloc0_8_i1 (gfc_array_i8 * const restrict, - gfc_array_i1 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i1 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_8_i1); void sminloc0_8_i1 (gfc_array_i8 * const restrict retarray, gfc_array_i1 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_8_i1 (gfc_array_i8 * const restrict retarray, if (*mask) { - minloc0_8_i1 (retarray, array); + minloc0_8_i1 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_8_i16.c b/libgfortran/generated/minloc0_8_i16.c index d703408f..b4fb041 100644 --- a/libgfortran/generated/minloc0_8_i16.c +++ b/libgfortran/generated/minloc0_8_i16.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_INTEGER_8) extern void minloc0_8_i16 (gfc_array_i8 * const restrict retarray, - gfc_array_i16 * const restrict array); + gfc_array_i16 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_8_i16); void minloc0_8_i16 (gfc_array_i8 * const restrict retarray, - gfc_array_i16 * const restrict array) + gfc_array_i16 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_8_i16 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_8_i16 (gfc_array_i8 * const restrict retarray, extern void mminloc0_8_i16 (gfc_array_i8 * const restrict, - gfc_array_i16 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i16 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_8_i16); void mminloc0_8_i16 (gfc_array_i8 * const restrict retarray, gfc_array_i16 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_8_i16 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_8_i16 (gfc_array_i8 * const restrict retarray, extern void sminloc0_8_i16 (gfc_array_i8 * const restrict, - gfc_array_i16 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i16 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_8_i16); void sminloc0_8_i16 (gfc_array_i8 * const restrict retarray, gfc_array_i16 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_8_i16 (gfc_array_i8 * const restrict retarray, if (*mask) { - minloc0_8_i16 (retarray, array); + minloc0_8_i16 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_8_i2.c b/libgfortran/generated/minloc0_8_i2.c index 003c33b..13b3904 100644 --- a/libgfortran/generated/minloc0_8_i2.c +++ b/libgfortran/generated/minloc0_8_i2.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_2) && defined (HAVE_GFC_INTEGER_8) extern void minloc0_8_i2 (gfc_array_i8 * const restrict retarray, - gfc_array_i2 * const restrict array); + gfc_array_i2 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_8_i2); void minloc0_8_i2 (gfc_array_i8 * const restrict retarray, - gfc_array_i2 * const restrict array) + gfc_array_i2 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_8_i2 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_8_i2 (gfc_array_i8 * const restrict retarray, extern void mminloc0_8_i2 (gfc_array_i8 * const restrict, - gfc_array_i2 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i2 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_8_i2); void mminloc0_8_i2 (gfc_array_i8 * const restrict retarray, gfc_array_i2 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_8_i2 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_8_i2 (gfc_array_i8 * const restrict retarray, extern void sminloc0_8_i2 (gfc_array_i8 * const restrict, - gfc_array_i2 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i2 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_8_i2); void sminloc0_8_i2 (gfc_array_i8 * const restrict retarray, gfc_array_i2 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_8_i2 (gfc_array_i8 * const restrict retarray, if (*mask) { - minloc0_8_i2 (retarray, array); + minloc0_8_i2 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_8_i4.c b/libgfortran/generated/minloc0_8_i4.c index 4b2f245..5d4dc06 100644 --- a/libgfortran/generated/minloc0_8_i4.c +++ b/libgfortran/generated/minloc0_8_i4.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_8) extern void minloc0_8_i4 (gfc_array_i8 * const restrict retarray, - gfc_array_i4 * const restrict array); + gfc_array_i4 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_8_i4); void minloc0_8_i4 (gfc_array_i8 * const restrict retarray, - gfc_array_i4 * const restrict array) + gfc_array_i4 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_8_i4 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_8_i4 (gfc_array_i8 * const restrict retarray, extern void mminloc0_8_i4 (gfc_array_i8 * const restrict, - gfc_array_i4 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i4 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_8_i4); void mminloc0_8_i4 (gfc_array_i8 * const restrict retarray, gfc_array_i4 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_8_i4 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_8_i4 (gfc_array_i8 * const restrict retarray, extern void sminloc0_8_i4 (gfc_array_i8 * const restrict, - gfc_array_i4 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i4 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_8_i4); void sminloc0_8_i4 (gfc_array_i8 * const restrict retarray, gfc_array_i4 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_8_i4 (gfc_array_i8 * const restrict retarray, if (*mask) { - minloc0_8_i4 (retarray, array); + minloc0_8_i4 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_8_i8.c b/libgfortran/generated/minloc0_8_i8.c index 6f2dc2e..d4cf9a4 100644 --- a/libgfortran/generated/minloc0_8_i8.c +++ b/libgfortran/generated/minloc0_8_i8.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_INTEGER_8) extern void minloc0_8_i8 (gfc_array_i8 * const restrict retarray, - gfc_array_i8 * const restrict array); + gfc_array_i8 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_8_i8); void minloc0_8_i8 (gfc_array_i8 * const restrict retarray, - gfc_array_i8 * const restrict array) + gfc_array_i8 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_8_i8 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_8_i8 (gfc_array_i8 * const restrict retarray, extern void mminloc0_8_i8 (gfc_array_i8 * const restrict, - gfc_array_i8 * const restrict, gfc_array_l1 * const restrict); + gfc_array_i8 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_8_i8); void mminloc0_8_i8 (gfc_array_i8 * const restrict retarray, gfc_array_i8 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_8_i8 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_8_i8 (gfc_array_i8 * const restrict retarray, extern void sminloc0_8_i8 (gfc_array_i8 * const restrict, - gfc_array_i8 * const restrict, GFC_LOGICAL_4 *); + gfc_array_i8 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_8_i8); void sminloc0_8_i8 (gfc_array_i8 * const restrict retarray, gfc_array_i8 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_8_i8 (gfc_array_i8 * const restrict retarray, if (*mask) { - minloc0_8_i8 (retarray, array); + minloc0_8_i8 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_8_r10.c b/libgfortran/generated/minloc0_8_r10.c index 1f08628..c74fe0f 100644 --- a/libgfortran/generated/minloc0_8_r10.c +++ b/libgfortran/generated/minloc0_8_r10.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_10) && defined (HAVE_GFC_INTEGER_8) extern void minloc0_8_r10 (gfc_array_i8 * const restrict retarray, - gfc_array_r10 * const restrict array); + gfc_array_r10 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_8_r10); void minloc0_8_r10 (gfc_array_i8 * const restrict retarray, - gfc_array_r10 * const restrict array) + gfc_array_r10 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_8_r10 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_8_r10 (gfc_array_i8 * const restrict retarray, extern void mminloc0_8_r10 (gfc_array_i8 * const restrict, - gfc_array_r10 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r10 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_8_r10); void mminloc0_8_r10 (gfc_array_i8 * const restrict retarray, gfc_array_r10 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_8_r10 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_8_r10 (gfc_array_i8 * const restrict retarray, extern void sminloc0_8_r10 (gfc_array_i8 * const restrict, - gfc_array_r10 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r10 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_8_r10); void sminloc0_8_r10 (gfc_array_i8 * const restrict retarray, gfc_array_r10 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_8_r10 (gfc_array_i8 * const restrict retarray, if (*mask) { - minloc0_8_r10 (retarray, array); + minloc0_8_r10 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_8_r16.c b/libgfortran/generated/minloc0_8_r16.c index e32fd13..0ce3fd7 100644 --- a/libgfortran/generated/minloc0_8_r16.c +++ b/libgfortran/generated/minloc0_8_r16.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_16) && defined (HAVE_GFC_INTEGER_8) extern void minloc0_8_r16 (gfc_array_i8 * const restrict retarray, - gfc_array_r16 * const restrict array); + gfc_array_r16 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_8_r16); void minloc0_8_r16 (gfc_array_i8 * const restrict retarray, - gfc_array_r16 * const restrict array) + gfc_array_r16 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_8_r16 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_8_r16 (gfc_array_i8 * const restrict retarray, extern void mminloc0_8_r16 (gfc_array_i8 * const restrict, - gfc_array_r16 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r16 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_8_r16); void mminloc0_8_r16 (gfc_array_i8 * const restrict retarray, gfc_array_r16 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_8_r16 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_8_r16 (gfc_array_i8 * const restrict retarray, extern void sminloc0_8_r16 (gfc_array_i8 * const restrict, - gfc_array_r16 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r16 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_8_r16); void sminloc0_8_r16 (gfc_array_i8 * const restrict retarray, gfc_array_r16 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_8_r16 (gfc_array_i8 * const restrict retarray, if (*mask) { - minloc0_8_r16 (retarray, array); + minloc0_8_r16 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_8_r4.c b/libgfortran/generated/minloc0_8_r4.c index 533e748..66c5b74 100644 --- a/libgfortran/generated/minloc0_8_r4.c +++ b/libgfortran/generated/minloc0_8_r4.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_4) && defined (HAVE_GFC_INTEGER_8) extern void minloc0_8_r4 (gfc_array_i8 * const restrict retarray, - gfc_array_r4 * const restrict array); + gfc_array_r4 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_8_r4); void minloc0_8_r4 (gfc_array_i8 * const restrict retarray, - gfc_array_r4 * const restrict array) + gfc_array_r4 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_8_r4 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_8_r4 (gfc_array_i8 * const restrict retarray, extern void mminloc0_8_r4 (gfc_array_i8 * const restrict, - gfc_array_r4 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r4 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_8_r4); void mminloc0_8_r4 (gfc_array_i8 * const restrict retarray, gfc_array_r4 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_8_r4 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_8_r4 (gfc_array_i8 * const restrict retarray, extern void sminloc0_8_r4 (gfc_array_i8 * const restrict, - gfc_array_r4 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r4 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_8_r4); void sminloc0_8_r4 (gfc_array_i8 * const restrict retarray, gfc_array_r4 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_8_r4 (gfc_array_i8 * const restrict retarray, if (*mask) { - minloc0_8_r4 (retarray, array); + minloc0_8_r4 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_8_r8.c b/libgfortran/generated/minloc0_8_r8.c index 1eb7423..bd6b217 100644 --- a/libgfortran/generated/minloc0_8_r8.c +++ b/libgfortran/generated/minloc0_8_r8.c @@ -24,18 +24,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_8) && defined (HAVE_GFC_INTEGER_8) extern void minloc0_8_r8 (gfc_array_i8 * const restrict retarray, - gfc_array_r8 * const restrict array); + gfc_array_r8 * const restrict array, GFC_LOGICAL_4); export_proto(minloc0_8_r8); void minloc0_8_r8 (gfc_array_i8 * const restrict retarray, - gfc_array_r8 * const restrict array) + gfc_array_r8 * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -46,6 +47,7 @@ minloc0_8_r8 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -167,13 +169,14 @@ minloc0_8_r8 (gfc_array_i8 * const restrict retarray, extern void mminloc0_8_r8 (gfc_array_i8 * const restrict, - gfc_array_r8 * const restrict, gfc_array_l1 * const restrict); + gfc_array_r8 * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(mminloc0_8_r8); void mminloc0_8_r8 (gfc_array_i8 * const restrict retarray, gfc_array_r8 * const restrict array, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -187,6 +190,7 @@ mminloc0_8_r8 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; + assert(back == 0); rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -335,13 +339,13 @@ mminloc0_8_r8 (gfc_array_i8 * const restrict retarray, extern void sminloc0_8_r8 (gfc_array_i8 * const restrict, - gfc_array_r8 * const restrict, GFC_LOGICAL_4 *); + gfc_array_r8 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(sminloc0_8_r8); void sminloc0_8_r8 (gfc_array_i8 * const restrict retarray, gfc_array_r8 * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -350,7 +354,7 @@ sminloc0_8_r8 (gfc_array_i8 * const restrict retarray, if (*mask) { - minloc0_8_r8 (retarray, array); + minloc0_8_r8 (retarray, array, back); return; } diff --git a/libgfortran/generated/minloc0_8_s1.c b/libgfortran/generated/minloc0_8_s1.c index d7b6bee..dd9be96 100644 --- a/libgfortran/generated/minloc0_8_s1.c +++ b/libgfortran/generated/minloc0_8_s1.c @@ -32,6 +32,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + static inline int compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) { @@ -43,12 +45,12 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) } extern void minloc0_8_s1 (gfc_array_i8 * const restrict retarray, - gfc_array_s1 * const restrict array, gfc_charlen_type len); + gfc_array_s1 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len); export_proto(minloc0_8_s1); void minloc0_8_s1 (gfc_array_i8 * const restrict retarray, - gfc_array_s1 * const restrict array, gfc_charlen_type len) + gfc_array_s1 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -59,6 +61,10 @@ minloc0_8_s1 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -149,13 +155,15 @@ minloc0_8_s1 (gfc_array_i8 * const restrict retarray, extern void mminloc0_8_s1 (gfc_array_i8 * const restrict, - gfc_array_s1 * const restrict, gfc_array_l1 * const restrict, gfc_charlen_type len); + gfc_array_s1 * const restrict, gfc_array_l1 * const restrict , GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(mminloc0_8_s1); void mminloc0_8_s1 (gfc_array_i8 * const restrict retarray, gfc_array_s1 * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -169,6 +177,9 @@ mminloc0_8_s1 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -282,13 +293,15 @@ mminloc0_8_s1 (gfc_array_i8 * const restrict retarray, extern void sminloc0_8_s1 (gfc_array_i8 * const restrict, - gfc_array_s1 * const restrict, GFC_LOGICAL_4 *, gfc_charlen_type len); + gfc_array_s1 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(sminloc0_8_s1); void sminloc0_8_s1 (gfc_array_i8 * const restrict retarray, gfc_array_s1 * const restrict array, - GFC_LOGICAL_4 * mask, gfc_charlen_type len) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type rank; index_type dstride; @@ -297,7 +310,11 @@ sminloc0_8_s1 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc0_8_s1 (retarray, array, back, len); +#else minloc0_8_s1 (retarray, array, len); +#endif return; } diff --git a/libgfortran/generated/minloc0_8_s4.c b/libgfortran/generated/minloc0_8_s4.c index ca1910c..46d29ec 100644 --- a/libgfortran/generated/minloc0_8_s4.c +++ b/libgfortran/generated/minloc0_8_s4.c @@ -32,6 +32,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + static inline int compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) { @@ -43,12 +45,12 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) } extern void minloc0_8_s4 (gfc_array_i8 * const restrict retarray, - gfc_array_s4 * const restrict array, gfc_charlen_type len); + gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len); export_proto(minloc0_8_s4); void minloc0_8_s4 (gfc_array_i8 * const restrict retarray, - gfc_array_s4 * const restrict array, gfc_charlen_type len) + gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -59,6 +61,10 @@ minloc0_8_s4 (gfc_array_i8 * const restrict retarray, index_type rank; index_type n; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif + rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -149,13 +155,15 @@ minloc0_8_s4 (gfc_array_i8 * const restrict retarray, extern void mminloc0_8_s4 (gfc_array_i8 * const restrict, - gfc_array_s4 * const restrict, gfc_array_l1 * const restrict, gfc_charlen_type len); + gfc_array_s4 * const restrict, gfc_array_l1 * const restrict , GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(mminloc0_8_s4); void mminloc0_8_s4 (gfc_array_i8 * const restrict retarray, gfc_array_s4 * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -169,6 +177,9 @@ mminloc0_8_s4 (gfc_array_i8 * const restrict retarray, index_type n; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif rank = GFC_DESCRIPTOR_RANK (array); if (rank <= 0) runtime_error ("Rank of array needs to be > 0"); @@ -282,13 +293,15 @@ mminloc0_8_s4 (gfc_array_i8 * const restrict retarray, extern void sminloc0_8_s4 (gfc_array_i8 * const restrict, - gfc_array_s4 * const restrict, GFC_LOGICAL_4 *, gfc_charlen_type len); + gfc_array_s4 * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, + gfc_charlen_type len); export_proto(sminloc0_8_s4); void sminloc0_8_s4 (gfc_array_i8 * const restrict retarray, gfc_array_s4 * const restrict array, - GFC_LOGICAL_4 * mask, gfc_charlen_type len) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type rank; index_type dstride; @@ -297,7 +310,11 @@ sminloc0_8_s4 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc0_8_s4 (retarray, array, back, len); +#else minloc0_8_s4 (retarray, array, len); +#endif return; } diff --git a/libgfortran/generated/minloc1_16_i1.c b/libgfortran/generated/minloc1_16_i1.c index e03ea37..20197c4 100644 --- a/libgfortran/generated/minloc1_16_i1.c +++ b/libgfortran/generated/minloc1_16_i1.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + extern void minloc1_16_i1 (gfc_array_i16 * const restrict, - gfc_array_i1 * const restrict, const index_type * const restrict); + gfc_array_i1 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_16_i1); void minloc1_16_i1 (gfc_array_i16 * const restrict retarray, gfc_array_i1 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_16_i1 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_16_i1 (gfc_array_i16 * const restrict retarray, extern void mminloc1_16_i1 (gfc_array_i16 * const restrict, gfc_array_i1 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_16_i1); void mminloc1_16_i1 (gfc_array_i16 * const restrict retarray, gfc_array_i1 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_16_i1 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_16_i1 (gfc_array_i16 * const restrict retarray, extern void sminloc1_16_i1 (gfc_array_i16 * const restrict, gfc_array_i1 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_16_i1); void sminloc1_16_i1 (gfc_array_i16 * const restrict retarray, gfc_array_i1 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_16_i1 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_16_i1 (retarray, array, pdim, back); +#else minloc1_16_i1 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_16_i16.c b/libgfortran/generated/minloc1_16_i16.c index 0ef0bda..fc718a8 100644 --- a/libgfortran/generated/minloc1_16_i16.c +++ b/libgfortran/generated/minloc1_16_i16.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + extern void minloc1_16_i16 (gfc_array_i16 * const restrict, - gfc_array_i16 * const restrict, const index_type * const restrict); + gfc_array_i16 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_16_i16); void minloc1_16_i16 (gfc_array_i16 * const restrict retarray, gfc_array_i16 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_16_i16 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_16_i16 (gfc_array_i16 * const restrict retarray, extern void mminloc1_16_i16 (gfc_array_i16 * const restrict, gfc_array_i16 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_16_i16); void mminloc1_16_i16 (gfc_array_i16 * const restrict retarray, gfc_array_i16 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_16_i16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_16_i16 (gfc_array_i16 * const restrict retarray, extern void sminloc1_16_i16 (gfc_array_i16 * const restrict, gfc_array_i16 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_16_i16); void sminloc1_16_i16 (gfc_array_i16 * const restrict retarray, gfc_array_i16 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_16_i16 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_16_i16 (retarray, array, pdim, back); +#else minloc1_16_i16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_16_i2.c b/libgfortran/generated/minloc1_16_i2.c index df854ce..e9352b1 100644 --- a/libgfortran/generated/minloc1_16_i2.c +++ b/libgfortran/generated/minloc1_16_i2.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_2) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + extern void minloc1_16_i2 (gfc_array_i16 * const restrict, - gfc_array_i2 * const restrict, const index_type * const restrict); + gfc_array_i2 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_16_i2); void minloc1_16_i2 (gfc_array_i16 * const restrict retarray, gfc_array_i2 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_16_i2 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_16_i2 (gfc_array_i16 * const restrict retarray, extern void mminloc1_16_i2 (gfc_array_i16 * const restrict, gfc_array_i2 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_16_i2); void mminloc1_16_i2 (gfc_array_i16 * const restrict retarray, gfc_array_i2 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_16_i2 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_16_i2 (gfc_array_i16 * const restrict retarray, extern void sminloc1_16_i2 (gfc_array_i16 * const restrict, gfc_array_i2 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_16_i2); void sminloc1_16_i2 (gfc_array_i16 * const restrict retarray, gfc_array_i2 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_16_i2 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_16_i2 (retarray, array, pdim, back); +#else minloc1_16_i2 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_16_i4.c b/libgfortran/generated/minloc1_16_i4.c index 8c02e7a..9faa5b3 100644 --- a/libgfortran/generated/minloc1_16_i4.c +++ b/libgfortran/generated/minloc1_16_i4.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + extern void minloc1_16_i4 (gfc_array_i16 * const restrict, - gfc_array_i4 * const restrict, const index_type * const restrict); + gfc_array_i4 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_16_i4); void minloc1_16_i4 (gfc_array_i16 * const restrict retarray, gfc_array_i4 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_16_i4 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_16_i4 (gfc_array_i16 * const restrict retarray, extern void mminloc1_16_i4 (gfc_array_i16 * const restrict, gfc_array_i4 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_16_i4); void mminloc1_16_i4 (gfc_array_i16 * const restrict retarray, gfc_array_i4 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_16_i4 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_16_i4 (gfc_array_i16 * const restrict retarray, extern void sminloc1_16_i4 (gfc_array_i16 * const restrict, gfc_array_i4 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_16_i4); void sminloc1_16_i4 (gfc_array_i16 * const restrict retarray, gfc_array_i4 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_16_i4 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_16_i4 (retarray, array, pdim, back); +#else minloc1_16_i4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_16_i8.c b/libgfortran/generated/minloc1_16_i8.c index 938da8d..6ad4abe 100644 --- a/libgfortran/generated/minloc1_16_i8.c +++ b/libgfortran/generated/minloc1_16_i8.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + extern void minloc1_16_i8 (gfc_array_i16 * const restrict, - gfc_array_i8 * const restrict, const index_type * const restrict); + gfc_array_i8 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_16_i8); void minloc1_16_i8 (gfc_array_i16 * const restrict retarray, gfc_array_i8 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_16_i8 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_16_i8 (gfc_array_i16 * const restrict retarray, extern void mminloc1_16_i8 (gfc_array_i16 * const restrict, gfc_array_i8 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_16_i8); void mminloc1_16_i8 (gfc_array_i16 * const restrict retarray, gfc_array_i8 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_16_i8 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_16_i8 (gfc_array_i16 * const restrict retarray, extern void sminloc1_16_i8 (gfc_array_i16 * const restrict, gfc_array_i8 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_16_i8); void sminloc1_16_i8 (gfc_array_i16 * const restrict retarray, gfc_array_i8 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_16_i8 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_16_i8 (retarray, array, pdim, back); +#else minloc1_16_i8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_16_r10.c b/libgfortran/generated/minloc1_16_r10.c index fbbcce6..930d077 100644 --- a/libgfortran/generated/minloc1_16_r10.c +++ b/libgfortran/generated/minloc1_16_r10.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_10) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + extern void minloc1_16_r10 (gfc_array_i16 * const restrict, - gfc_array_r10 * const restrict, const index_type * const restrict); + gfc_array_r10 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_16_r10); void minloc1_16_r10 (gfc_array_i16 * const restrict retarray, gfc_array_r10 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_16_r10 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_16_r10 (gfc_array_i16 * const restrict retarray, extern void mminloc1_16_r10 (gfc_array_i16 * const restrict, gfc_array_r10 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_16_r10); void mminloc1_16_r10 (gfc_array_i16 * const restrict retarray, gfc_array_r10 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_16_r10 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_16_r10 (gfc_array_i16 * const restrict retarray, extern void sminloc1_16_r10 (gfc_array_i16 * const restrict, gfc_array_r10 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_16_r10); void sminloc1_16_r10 (gfc_array_i16 * const restrict retarray, gfc_array_r10 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_16_r10 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_16_r10 (retarray, array, pdim, back); +#else minloc1_16_r10 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_16_r16.c b/libgfortran/generated/minloc1_16_r16.c index 4d3df6c..2003d8f 100644 --- a/libgfortran/generated/minloc1_16_r16.c +++ b/libgfortran/generated/minloc1_16_r16.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_16) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + extern void minloc1_16_r16 (gfc_array_i16 * const restrict, - gfc_array_r16 * const restrict, const index_type * const restrict); + gfc_array_r16 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_16_r16); void minloc1_16_r16 (gfc_array_i16 * const restrict retarray, gfc_array_r16 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_16_r16 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_16_r16 (gfc_array_i16 * const restrict retarray, extern void mminloc1_16_r16 (gfc_array_i16 * const restrict, gfc_array_r16 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_16_r16); void mminloc1_16_r16 (gfc_array_i16 * const restrict retarray, gfc_array_r16 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_16_r16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_16_r16 (gfc_array_i16 * const restrict retarray, extern void sminloc1_16_r16 (gfc_array_i16 * const restrict, gfc_array_r16 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_16_r16); void sminloc1_16_r16 (gfc_array_i16 * const restrict retarray, gfc_array_r16 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_16_r16 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_16_r16 (retarray, array, pdim, back); +#else minloc1_16_r16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_16_r4.c b/libgfortran/generated/minloc1_16_r4.c index ff62be4..7b96983 100644 --- a/libgfortran/generated/minloc1_16_r4.c +++ b/libgfortran/generated/minloc1_16_r4.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_4) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + extern void minloc1_16_r4 (gfc_array_i16 * const restrict, - gfc_array_r4 * const restrict, const index_type * const restrict); + gfc_array_r4 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_16_r4); void minloc1_16_r4 (gfc_array_i16 * const restrict retarray, gfc_array_r4 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_16_r4 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_16_r4 (gfc_array_i16 * const restrict retarray, extern void mminloc1_16_r4 (gfc_array_i16 * const restrict, gfc_array_r4 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_16_r4); void mminloc1_16_r4 (gfc_array_i16 * const restrict retarray, gfc_array_r4 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_16_r4 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_16_r4 (gfc_array_i16 * const restrict retarray, extern void sminloc1_16_r4 (gfc_array_i16 * const restrict, gfc_array_r4 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_16_r4); void sminloc1_16_r4 (gfc_array_i16 * const restrict retarray, gfc_array_r4 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_16_r4 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_16_r4 (retarray, array, pdim, back); +#else minloc1_16_r4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_16_r8.c b/libgfortran/generated/minloc1_16_r8.c index 51ea636..d683915 100644 --- a/libgfortran/generated/minloc1_16_r8.c +++ b/libgfortran/generated/minloc1_16_r8.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_8) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + extern void minloc1_16_r8 (gfc_array_i16 * const restrict, - gfc_array_r8 * const restrict, const index_type * const restrict); + gfc_array_r8 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_16_r8); void minloc1_16_r8 (gfc_array_i16 * const restrict retarray, gfc_array_r8 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_16_r8 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_16_r8 (gfc_array_i16 * const restrict retarray, extern void mminloc1_16_r8 (gfc_array_i16 * const restrict, gfc_array_r8 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_16_r8); void mminloc1_16_r8 (gfc_array_i16 * const restrict retarray, gfc_array_r8 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_16_r8 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_16_r8 (gfc_array_i16 * const restrict retarray, extern void sminloc1_16_r8 (gfc_array_i16 * const restrict, gfc_array_r8 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_16_r8); void sminloc1_16_r8 (gfc_array_i16 * const restrict retarray, gfc_array_r8 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_16_r8 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_16_r8 (retarray, array, pdim, back); +#else minloc1_16_r8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_16_s1.c b/libgfortran/generated/minloc1_16_s1.c index 51d49c2..898d124 100644 --- a/libgfortran/generated/minloc1_16_s1.c +++ b/libgfortran/generated/minloc1_16_s1.c @@ -28,7 +28,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + #include <string.h> +#include <assert.h> static inline int compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) @@ -40,14 +43,15 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) } extern void minloc1_16_s1 (gfc_array_i16 * const restrict, - gfc_array_s1 * const restrict, const index_type * const restrict, + gfc_array_s1 * const restrict, const index_type * const restrict , GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(minloc1_16_s1); void minloc1_16_s1 (gfc_array_i16 * const restrict retarray, gfc_array_s1 * const restrict array, - const index_type * const restrict pdim, gfc_charlen_type string_len) + const index_type * const restrict pdim, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -62,6 +66,10 @@ minloc1_16_s1 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -210,14 +218,15 @@ minloc1_16_s1 (gfc_array_i16 * const restrict retarray, extern void mminloc1_16_s1 (gfc_array_i16 * const restrict, gfc_array_s1 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict, gfc_charlen_type); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(mminloc1_16_s1); void mminloc1_16_s1 (gfc_array_i16 * const restrict retarray, gfc_array_s1 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask, gfc_charlen_type string_len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -235,6 +244,9 @@ mminloc1_16_s1 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -411,14 +423,14 @@ mminloc1_16_s1 (gfc_array_i16 * const restrict retarray, extern void sminloc1_16_s1 (gfc_array_i16 * const restrict, gfc_array_s1 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *, gfc_charlen_type); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(sminloc1_16_s1); void sminloc1_16_s1 (gfc_array_i16 * const restrict retarray, gfc_array_s1 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask, gfc_charlen_type string_len) + GFC_LOGICAL_4 * mask , GFC_LOGICAL_4 back, gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -431,7 +443,11 @@ sminloc1_16_s1 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_16_s1 (retarray, array, pdim, back, string_len); +#else minloc1_16_s1 (retarray, array, pdim, string_len); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_16_s4.c b/libgfortran/generated/minloc1_16_s4.c index cebf6b3..82eb258 100644 --- a/libgfortran/generated/minloc1_16_s4.c +++ b/libgfortran/generated/minloc1_16_s4.c @@ -28,7 +28,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_16) +#define HAVE_BACK_ARG 1 + #include <string.h> +#include <assert.h> static inline int compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) @@ -40,14 +43,15 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) } extern void minloc1_16_s4 (gfc_array_i16 * const restrict, - gfc_array_s4 * const restrict, const index_type * const restrict, + gfc_array_s4 * const restrict, const index_type * const restrict , GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(minloc1_16_s4); void minloc1_16_s4 (gfc_array_i16 * const restrict retarray, gfc_array_s4 * const restrict array, - const index_type * const restrict pdim, gfc_charlen_type string_len) + const index_type * const restrict pdim, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -62,6 +66,10 @@ minloc1_16_s4 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -210,14 +218,15 @@ minloc1_16_s4 (gfc_array_i16 * const restrict retarray, extern void mminloc1_16_s4 (gfc_array_i16 * const restrict, gfc_array_s4 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict, gfc_charlen_type); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(mminloc1_16_s4); void mminloc1_16_s4 (gfc_array_i16 * const restrict retarray, gfc_array_s4 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask, gfc_charlen_type string_len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -235,6 +244,9 @@ mminloc1_16_s4 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -411,14 +423,14 @@ mminloc1_16_s4 (gfc_array_i16 * const restrict retarray, extern void sminloc1_16_s4 (gfc_array_i16 * const restrict, gfc_array_s4 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *, gfc_charlen_type); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(sminloc1_16_s4); void sminloc1_16_s4 (gfc_array_i16 * const restrict retarray, gfc_array_s4 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask, gfc_charlen_type string_len) + GFC_LOGICAL_4 * mask , GFC_LOGICAL_4 back, gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -431,7 +443,11 @@ sminloc1_16_s4 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_16_s4 (retarray, array, pdim, back, string_len); +#else minloc1_16_s4 (retarray, array, pdim, string_len); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_4_i1.c b/libgfortran/generated/minloc1_4_i1.c index e961877..b36f268 100644 --- a/libgfortran/generated/minloc1_4_i1.c +++ b/libgfortran/generated/minloc1_4_i1.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + extern void minloc1_4_i1 (gfc_array_i4 * const restrict, - gfc_array_i1 * const restrict, const index_type * const restrict); + gfc_array_i1 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_4_i1); void minloc1_4_i1 (gfc_array_i4 * const restrict retarray, gfc_array_i1 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_4_i1 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_4_i1 (gfc_array_i4 * const restrict retarray, extern void mminloc1_4_i1 (gfc_array_i4 * const restrict, gfc_array_i1 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_4_i1); void mminloc1_4_i1 (gfc_array_i4 * const restrict retarray, gfc_array_i1 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_4_i1 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_4_i1 (gfc_array_i4 * const restrict retarray, extern void sminloc1_4_i1 (gfc_array_i4 * const restrict, gfc_array_i1 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_4_i1); void sminloc1_4_i1 (gfc_array_i4 * const restrict retarray, gfc_array_i1 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_4_i1 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_4_i1 (retarray, array, pdim, back); +#else minloc1_4_i1 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_4_i16.c b/libgfortran/generated/minloc1_4_i16.c index 3ea294e..b4454e1 100644 --- a/libgfortran/generated/minloc1_4_i16.c +++ b/libgfortran/generated/minloc1_4_i16.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + extern void minloc1_4_i16 (gfc_array_i4 * const restrict, - gfc_array_i16 * const restrict, const index_type * const restrict); + gfc_array_i16 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_4_i16); void minloc1_4_i16 (gfc_array_i4 * const restrict retarray, gfc_array_i16 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_4_i16 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_4_i16 (gfc_array_i4 * const restrict retarray, extern void mminloc1_4_i16 (gfc_array_i4 * const restrict, gfc_array_i16 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_4_i16); void mminloc1_4_i16 (gfc_array_i4 * const restrict retarray, gfc_array_i16 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_4_i16 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_4_i16 (gfc_array_i4 * const restrict retarray, extern void sminloc1_4_i16 (gfc_array_i4 * const restrict, gfc_array_i16 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_4_i16); void sminloc1_4_i16 (gfc_array_i4 * const restrict retarray, gfc_array_i16 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_4_i16 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_4_i16 (retarray, array, pdim, back); +#else minloc1_4_i16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_4_i2.c b/libgfortran/generated/minloc1_4_i2.c index 564c262..f8ab77c 100644 --- a/libgfortran/generated/minloc1_4_i2.c +++ b/libgfortran/generated/minloc1_4_i2.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_2) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + extern void minloc1_4_i2 (gfc_array_i4 * const restrict, - gfc_array_i2 * const restrict, const index_type * const restrict); + gfc_array_i2 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_4_i2); void minloc1_4_i2 (gfc_array_i4 * const restrict retarray, gfc_array_i2 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_4_i2 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_4_i2 (gfc_array_i4 * const restrict retarray, extern void mminloc1_4_i2 (gfc_array_i4 * const restrict, gfc_array_i2 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_4_i2); void mminloc1_4_i2 (gfc_array_i4 * const restrict retarray, gfc_array_i2 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_4_i2 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_4_i2 (gfc_array_i4 * const restrict retarray, extern void sminloc1_4_i2 (gfc_array_i4 * const restrict, gfc_array_i2 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_4_i2); void sminloc1_4_i2 (gfc_array_i4 * const restrict retarray, gfc_array_i2 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_4_i2 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_4_i2 (retarray, array, pdim, back); +#else minloc1_4_i2 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_4_i4.c b/libgfortran/generated/minloc1_4_i4.c index 97dd9c2..6523d01 100644 --- a/libgfortran/generated/minloc1_4_i4.c +++ b/libgfortran/generated/minloc1_4_i4.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + extern void minloc1_4_i4 (gfc_array_i4 * const restrict, - gfc_array_i4 * const restrict, const index_type * const restrict); + gfc_array_i4 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_4_i4); void minloc1_4_i4 (gfc_array_i4 * const restrict retarray, gfc_array_i4 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_4_i4 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_4_i4 (gfc_array_i4 * const restrict retarray, extern void mminloc1_4_i4 (gfc_array_i4 * const restrict, gfc_array_i4 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_4_i4); void mminloc1_4_i4 (gfc_array_i4 * const restrict retarray, gfc_array_i4 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_4_i4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_4_i4 (gfc_array_i4 * const restrict retarray, extern void sminloc1_4_i4 (gfc_array_i4 * const restrict, gfc_array_i4 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_4_i4); void sminloc1_4_i4 (gfc_array_i4 * const restrict retarray, gfc_array_i4 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_4_i4 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_4_i4 (retarray, array, pdim, back); +#else minloc1_4_i4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_4_i8.c b/libgfortran/generated/minloc1_4_i8.c index 4c40632..ab1b6ba 100644 --- a/libgfortran/generated/minloc1_4_i8.c +++ b/libgfortran/generated/minloc1_4_i8.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + extern void minloc1_4_i8 (gfc_array_i4 * const restrict, - gfc_array_i8 * const restrict, const index_type * const restrict); + gfc_array_i8 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_4_i8); void minloc1_4_i8 (gfc_array_i4 * const restrict retarray, gfc_array_i8 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_4_i8 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_4_i8 (gfc_array_i4 * const restrict retarray, extern void mminloc1_4_i8 (gfc_array_i4 * const restrict, gfc_array_i8 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_4_i8); void mminloc1_4_i8 (gfc_array_i4 * const restrict retarray, gfc_array_i8 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_4_i8 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_4_i8 (gfc_array_i4 * const restrict retarray, extern void sminloc1_4_i8 (gfc_array_i4 * const restrict, gfc_array_i8 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_4_i8); void sminloc1_4_i8 (gfc_array_i4 * const restrict retarray, gfc_array_i8 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_4_i8 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_4_i8 (retarray, array, pdim, back); +#else minloc1_4_i8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_4_r10.c b/libgfortran/generated/minloc1_4_r10.c index 01903a79..a481ec4 100644 --- a/libgfortran/generated/minloc1_4_r10.c +++ b/libgfortran/generated/minloc1_4_r10.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_10) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + extern void minloc1_4_r10 (gfc_array_i4 * const restrict, - gfc_array_r10 * const restrict, const index_type * const restrict); + gfc_array_r10 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_4_r10); void minloc1_4_r10 (gfc_array_i4 * const restrict retarray, gfc_array_r10 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_4_r10 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_4_r10 (gfc_array_i4 * const restrict retarray, extern void mminloc1_4_r10 (gfc_array_i4 * const restrict, gfc_array_r10 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_4_r10); void mminloc1_4_r10 (gfc_array_i4 * const restrict retarray, gfc_array_r10 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_4_r10 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_4_r10 (gfc_array_i4 * const restrict retarray, extern void sminloc1_4_r10 (gfc_array_i4 * const restrict, gfc_array_r10 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_4_r10); void sminloc1_4_r10 (gfc_array_i4 * const restrict retarray, gfc_array_r10 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_4_r10 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_4_r10 (retarray, array, pdim, back); +#else minloc1_4_r10 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_4_r16.c b/libgfortran/generated/minloc1_4_r16.c index f266ea7..f5fcb66 100644 --- a/libgfortran/generated/minloc1_4_r16.c +++ b/libgfortran/generated/minloc1_4_r16.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_16) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + extern void minloc1_4_r16 (gfc_array_i4 * const restrict, - gfc_array_r16 * const restrict, const index_type * const restrict); + gfc_array_r16 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_4_r16); void minloc1_4_r16 (gfc_array_i4 * const restrict retarray, gfc_array_r16 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_4_r16 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_4_r16 (gfc_array_i4 * const restrict retarray, extern void mminloc1_4_r16 (gfc_array_i4 * const restrict, gfc_array_r16 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_4_r16); void mminloc1_4_r16 (gfc_array_i4 * const restrict retarray, gfc_array_r16 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_4_r16 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_4_r16 (gfc_array_i4 * const restrict retarray, extern void sminloc1_4_r16 (gfc_array_i4 * const restrict, gfc_array_r16 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_4_r16); void sminloc1_4_r16 (gfc_array_i4 * const restrict retarray, gfc_array_r16 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_4_r16 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_4_r16 (retarray, array, pdim, back); +#else minloc1_4_r16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_4_r4.c b/libgfortran/generated/minloc1_4_r4.c index 3f680e5..212aa25 100644 --- a/libgfortran/generated/minloc1_4_r4.c +++ b/libgfortran/generated/minloc1_4_r4.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_4) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + extern void minloc1_4_r4 (gfc_array_i4 * const restrict, - gfc_array_r4 * const restrict, const index_type * const restrict); + gfc_array_r4 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_4_r4); void minloc1_4_r4 (gfc_array_i4 * const restrict retarray, gfc_array_r4 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_4_r4 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_4_r4 (gfc_array_i4 * const restrict retarray, extern void mminloc1_4_r4 (gfc_array_i4 * const restrict, gfc_array_r4 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_4_r4); void mminloc1_4_r4 (gfc_array_i4 * const restrict retarray, gfc_array_r4 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_4_r4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_4_r4 (gfc_array_i4 * const restrict retarray, extern void sminloc1_4_r4 (gfc_array_i4 * const restrict, gfc_array_r4 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_4_r4); void sminloc1_4_r4 (gfc_array_i4 * const restrict retarray, gfc_array_r4 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_4_r4 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_4_r4 (retarray, array, pdim, back); +#else minloc1_4_r4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_4_r8.c b/libgfortran/generated/minloc1_4_r8.c index dc425ef..1fa41f2 100644 --- a/libgfortran/generated/minloc1_4_r8.c +++ b/libgfortran/generated/minloc1_4_r8.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_8) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + extern void minloc1_4_r8 (gfc_array_i4 * const restrict, - gfc_array_r8 * const restrict, const index_type * const restrict); + gfc_array_r8 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_4_r8); void minloc1_4_r8 (gfc_array_i4 * const restrict retarray, gfc_array_r8 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_4_r8 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_4_r8 (gfc_array_i4 * const restrict retarray, extern void mminloc1_4_r8 (gfc_array_i4 * const restrict, gfc_array_r8 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_4_r8); void mminloc1_4_r8 (gfc_array_i4 * const restrict retarray, gfc_array_r8 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_4_r8 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_4_r8 (gfc_array_i4 * const restrict retarray, extern void sminloc1_4_r8 (gfc_array_i4 * const restrict, gfc_array_r8 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_4_r8); void sminloc1_4_r8 (gfc_array_i4 * const restrict retarray, gfc_array_r8 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_4_r8 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_4_r8 (retarray, array, pdim, back); +#else minloc1_4_r8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_4_s1.c b/libgfortran/generated/minloc1_4_s1.c index 0b8c0e8..1b7e551 100644 --- a/libgfortran/generated/minloc1_4_s1.c +++ b/libgfortran/generated/minloc1_4_s1.c @@ -28,7 +28,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + #include <string.h> +#include <assert.h> static inline int compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) @@ -40,14 +43,15 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) } extern void minloc1_4_s1 (gfc_array_i4 * const restrict, - gfc_array_s1 * const restrict, const index_type * const restrict, + gfc_array_s1 * const restrict, const index_type * const restrict , GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(minloc1_4_s1); void minloc1_4_s1 (gfc_array_i4 * const restrict retarray, gfc_array_s1 * const restrict array, - const index_type * const restrict pdim, gfc_charlen_type string_len) + const index_type * const restrict pdim, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -62,6 +66,10 @@ minloc1_4_s1 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -210,14 +218,15 @@ minloc1_4_s1 (gfc_array_i4 * const restrict retarray, extern void mminloc1_4_s1 (gfc_array_i4 * const restrict, gfc_array_s1 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict, gfc_charlen_type); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(mminloc1_4_s1); void mminloc1_4_s1 (gfc_array_i4 * const restrict retarray, gfc_array_s1 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask, gfc_charlen_type string_len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -235,6 +244,9 @@ mminloc1_4_s1 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -411,14 +423,14 @@ mminloc1_4_s1 (gfc_array_i4 * const restrict retarray, extern void sminloc1_4_s1 (gfc_array_i4 * const restrict, gfc_array_s1 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *, gfc_charlen_type); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(sminloc1_4_s1); void sminloc1_4_s1 (gfc_array_i4 * const restrict retarray, gfc_array_s1 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask, gfc_charlen_type string_len) + GFC_LOGICAL_4 * mask , GFC_LOGICAL_4 back, gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -431,7 +443,11 @@ sminloc1_4_s1 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_4_s1 (retarray, array, pdim, back, string_len); +#else minloc1_4_s1 (retarray, array, pdim, string_len); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_4_s4.c b/libgfortran/generated/minloc1_4_s4.c index c92f690..b3c6010 100644 --- a/libgfortran/generated/minloc1_4_s4.c +++ b/libgfortran/generated/minloc1_4_s4.c @@ -28,7 +28,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4) +#define HAVE_BACK_ARG 1 + #include <string.h> +#include <assert.h> static inline int compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) @@ -40,14 +43,15 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) } extern void minloc1_4_s4 (gfc_array_i4 * const restrict, - gfc_array_s4 * const restrict, const index_type * const restrict, + gfc_array_s4 * const restrict, const index_type * const restrict , GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(minloc1_4_s4); void minloc1_4_s4 (gfc_array_i4 * const restrict retarray, gfc_array_s4 * const restrict array, - const index_type * const restrict pdim, gfc_charlen_type string_len) + const index_type * const restrict pdim, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -62,6 +66,10 @@ minloc1_4_s4 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -210,14 +218,15 @@ minloc1_4_s4 (gfc_array_i4 * const restrict retarray, extern void mminloc1_4_s4 (gfc_array_i4 * const restrict, gfc_array_s4 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict, gfc_charlen_type); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(mminloc1_4_s4); void mminloc1_4_s4 (gfc_array_i4 * const restrict retarray, gfc_array_s4 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask, gfc_charlen_type string_len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -235,6 +244,9 @@ mminloc1_4_s4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -411,14 +423,14 @@ mminloc1_4_s4 (gfc_array_i4 * const restrict retarray, extern void sminloc1_4_s4 (gfc_array_i4 * const restrict, gfc_array_s4 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *, gfc_charlen_type); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(sminloc1_4_s4); void sminloc1_4_s4 (gfc_array_i4 * const restrict retarray, gfc_array_s4 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask, gfc_charlen_type string_len) + GFC_LOGICAL_4 * mask , GFC_LOGICAL_4 back, gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -431,7 +443,11 @@ sminloc1_4_s4 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_4_s4 (retarray, array, pdim, back, string_len); +#else minloc1_4_s4 (retarray, array, pdim, string_len); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_8_i1.c b/libgfortran/generated/minloc1_8_i1.c index 913a7a6..66771b3 100644 --- a/libgfortran/generated/minloc1_8_i1.c +++ b/libgfortran/generated/minloc1_8_i1.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + extern void minloc1_8_i1 (gfc_array_i8 * const restrict, - gfc_array_i1 * const restrict, const index_type * const restrict); + gfc_array_i1 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_8_i1); void minloc1_8_i1 (gfc_array_i8 * const restrict retarray, gfc_array_i1 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_8_i1 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_8_i1 (gfc_array_i8 * const restrict retarray, extern void mminloc1_8_i1 (gfc_array_i8 * const restrict, gfc_array_i1 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_8_i1); void mminloc1_8_i1 (gfc_array_i8 * const restrict retarray, gfc_array_i1 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_8_i1 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_8_i1 (gfc_array_i8 * const restrict retarray, extern void sminloc1_8_i1 (gfc_array_i8 * const restrict, gfc_array_i1 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_8_i1); void sminloc1_8_i1 (gfc_array_i8 * const restrict retarray, gfc_array_i1 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_8_i1 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_8_i1 (retarray, array, pdim, back); +#else minloc1_8_i1 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_8_i16.c b/libgfortran/generated/minloc1_8_i16.c index 218b20c..8c7bc19 100644 --- a/libgfortran/generated/minloc1_8_i16.c +++ b/libgfortran/generated/minloc1_8_i16.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + extern void minloc1_8_i16 (gfc_array_i8 * const restrict, - gfc_array_i16 * const restrict, const index_type * const restrict); + gfc_array_i16 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_8_i16); void minloc1_8_i16 (gfc_array_i8 * const restrict retarray, gfc_array_i16 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_8_i16 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_8_i16 (gfc_array_i8 * const restrict retarray, extern void mminloc1_8_i16 (gfc_array_i8 * const restrict, gfc_array_i16 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_8_i16); void mminloc1_8_i16 (gfc_array_i8 * const restrict retarray, gfc_array_i16 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_8_i16 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_8_i16 (gfc_array_i8 * const restrict retarray, extern void sminloc1_8_i16 (gfc_array_i8 * const restrict, gfc_array_i16 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_8_i16); void sminloc1_8_i16 (gfc_array_i8 * const restrict retarray, gfc_array_i16 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_8_i16 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_8_i16 (retarray, array, pdim, back); +#else minloc1_8_i16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_8_i2.c b/libgfortran/generated/minloc1_8_i2.c index 191bcce..e31acb5 100644 --- a/libgfortran/generated/minloc1_8_i2.c +++ b/libgfortran/generated/minloc1_8_i2.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_2) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + extern void minloc1_8_i2 (gfc_array_i8 * const restrict, - gfc_array_i2 * const restrict, const index_type * const restrict); + gfc_array_i2 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_8_i2); void minloc1_8_i2 (gfc_array_i8 * const restrict retarray, gfc_array_i2 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_8_i2 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_8_i2 (gfc_array_i8 * const restrict retarray, extern void mminloc1_8_i2 (gfc_array_i8 * const restrict, gfc_array_i2 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_8_i2); void mminloc1_8_i2 (gfc_array_i8 * const restrict retarray, gfc_array_i2 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_8_i2 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_8_i2 (gfc_array_i8 * const restrict retarray, extern void sminloc1_8_i2 (gfc_array_i8 * const restrict, gfc_array_i2 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_8_i2); void sminloc1_8_i2 (gfc_array_i8 * const restrict retarray, gfc_array_i2 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_8_i2 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_8_i2 (retarray, array, pdim, back); +#else minloc1_8_i2 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_8_i4.c b/libgfortran/generated/minloc1_8_i4.c index ff61786..4402bdd 100644 --- a/libgfortran/generated/minloc1_8_i4.c +++ b/libgfortran/generated/minloc1_8_i4.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + extern void minloc1_8_i4 (gfc_array_i8 * const restrict, - gfc_array_i4 * const restrict, const index_type * const restrict); + gfc_array_i4 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_8_i4); void minloc1_8_i4 (gfc_array_i8 * const restrict retarray, gfc_array_i4 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_8_i4 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_8_i4 (gfc_array_i8 * const restrict retarray, extern void mminloc1_8_i4 (gfc_array_i8 * const restrict, gfc_array_i4 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_8_i4); void mminloc1_8_i4 (gfc_array_i8 * const restrict retarray, gfc_array_i4 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_8_i4 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_8_i4 (gfc_array_i8 * const restrict retarray, extern void sminloc1_8_i4 (gfc_array_i8 * const restrict, gfc_array_i4 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_8_i4); void sminloc1_8_i4 (gfc_array_i8 * const restrict retarray, gfc_array_i4 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_8_i4 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_8_i4 (retarray, array, pdim, back); +#else minloc1_8_i4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_8_i8.c b/libgfortran/generated/minloc1_8_i8.c index 42f917c..172cbb5 100644 --- a/libgfortran/generated/minloc1_8_i8.c +++ b/libgfortran/generated/minloc1_8_i8.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + extern void minloc1_8_i8 (gfc_array_i8 * const restrict, - gfc_array_i8 * const restrict, const index_type * const restrict); + gfc_array_i8 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_8_i8); void minloc1_8_i8 (gfc_array_i8 * const restrict retarray, gfc_array_i8 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_8_i8 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_8_i8 (gfc_array_i8 * const restrict retarray, extern void mminloc1_8_i8 (gfc_array_i8 * const restrict, gfc_array_i8 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_8_i8); void mminloc1_8_i8 (gfc_array_i8 * const restrict retarray, gfc_array_i8 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_8_i8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_8_i8 (gfc_array_i8 * const restrict retarray, extern void sminloc1_8_i8 (gfc_array_i8 * const restrict, gfc_array_i8 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_8_i8); void sminloc1_8_i8 (gfc_array_i8 * const restrict retarray, gfc_array_i8 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_8_i8 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_8_i8 (retarray, array, pdim, back); +#else minloc1_8_i8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_8_r10.c b/libgfortran/generated/minloc1_8_r10.c index 603f57b..557e876 100644 --- a/libgfortran/generated/minloc1_8_r10.c +++ b/libgfortran/generated/minloc1_8_r10.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_10) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + extern void minloc1_8_r10 (gfc_array_i8 * const restrict, - gfc_array_r10 * const restrict, const index_type * const restrict); + gfc_array_r10 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_8_r10); void minloc1_8_r10 (gfc_array_i8 * const restrict retarray, gfc_array_r10 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_8_r10 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_8_r10 (gfc_array_i8 * const restrict retarray, extern void mminloc1_8_r10 (gfc_array_i8 * const restrict, gfc_array_r10 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_8_r10); void mminloc1_8_r10 (gfc_array_i8 * const restrict retarray, gfc_array_r10 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_8_r10 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_8_r10 (gfc_array_i8 * const restrict retarray, extern void sminloc1_8_r10 (gfc_array_i8 * const restrict, gfc_array_r10 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_8_r10); void sminloc1_8_r10 (gfc_array_i8 * const restrict retarray, gfc_array_r10 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_8_r10 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_8_r10 (retarray, array, pdim, back); +#else minloc1_8_r10 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_8_r16.c b/libgfortran/generated/minloc1_8_r16.c index cad0d00..184dd1e 100644 --- a/libgfortran/generated/minloc1_8_r16.c +++ b/libgfortran/generated/minloc1_8_r16.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_16) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + extern void minloc1_8_r16 (gfc_array_i8 * const restrict, - gfc_array_r16 * const restrict, const index_type * const restrict); + gfc_array_r16 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_8_r16); void minloc1_8_r16 (gfc_array_i8 * const restrict retarray, gfc_array_r16 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_8_r16 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_8_r16 (gfc_array_i8 * const restrict retarray, extern void mminloc1_8_r16 (gfc_array_i8 * const restrict, gfc_array_r16 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_8_r16); void mminloc1_8_r16 (gfc_array_i8 * const restrict retarray, gfc_array_r16 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_8_r16 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_8_r16 (gfc_array_i8 * const restrict retarray, extern void sminloc1_8_r16 (gfc_array_i8 * const restrict, gfc_array_r16 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_8_r16); void sminloc1_8_r16 (gfc_array_i8 * const restrict retarray, gfc_array_r16 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_8_r16 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_8_r16 (retarray, array, pdim, back); +#else minloc1_8_r16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_8_r4.c b/libgfortran/generated/minloc1_8_r4.c index 15d7482..fd81020 100644 --- a/libgfortran/generated/minloc1_8_r4.c +++ b/libgfortran/generated/minloc1_8_r4.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_4) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + extern void minloc1_8_r4 (gfc_array_i8 * const restrict, - gfc_array_r4 * const restrict, const index_type * const restrict); + gfc_array_r4 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_8_r4); void minloc1_8_r4 (gfc_array_i8 * const restrict retarray, gfc_array_r4 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_8_r4 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_8_r4 (gfc_array_i8 * const restrict retarray, extern void mminloc1_8_r4 (gfc_array_i8 * const restrict, gfc_array_r4 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_8_r4); void mminloc1_8_r4 (gfc_array_i8 * const restrict retarray, gfc_array_r4 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_8_r4 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_8_r4 (gfc_array_i8 * const restrict retarray, extern void sminloc1_8_r4 (gfc_array_i8 * const restrict, gfc_array_r4 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_8_r4); void sminloc1_8_r4 (gfc_array_i8 * const restrict retarray, gfc_array_r4 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_8_r4 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_8_r4 (retarray, array, pdim, back); +#else minloc1_8_r4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_8_r8.c b/libgfortran/generated/minloc1_8_r8.c index 7cd1c9d..fc0ff7c 100644 --- a/libgfortran/generated/minloc1_8_r8.c +++ b/libgfortran/generated/minloc1_8_r8.c @@ -24,19 +24,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #include "libgfortran.h" +#include <assert.h> #if defined (HAVE_GFC_REAL_8) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + extern void minloc1_8_r8 (gfc_array_i8 * const restrict, - gfc_array_r8 * const restrict, const index_type * const restrict); + gfc_array_r8 * const restrict, const index_type * const restrict, GFC_LOGICAL_4 back); export_proto(minloc1_8_r8); void minloc1_8_r8 (gfc_array_i8 * const restrict retarray, gfc_array_r8 * const restrict array, - const index_type * const restrict pdim) + const index_type * const restrict pdim, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -51,6 +54,10 @@ minloc1_8_r8 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -214,14 +221,14 @@ minloc1_8_r8 (gfc_array_i8 * const restrict retarray, extern void mminloc1_8_r8 (gfc_array_i8 * const restrict, gfc_array_r8 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back); export_proto(mminloc1_8_r8); void mminloc1_8_r8 (gfc_array_i8 * const restrict retarray, gfc_array_r8 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -239,6 +246,9 @@ mminloc1_8_r8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -433,14 +443,14 @@ mminloc1_8_r8 (gfc_array_i8 * const restrict retarray, extern void sminloc1_8_r8 (gfc_array_i8 * const restrict, gfc_array_r8 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back); export_proto(sminloc1_8_r8); void sminloc1_8_r8 (gfc_array_i8 * const restrict retarray, gfc_array_r8 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -453,7 +463,11 @@ sminloc1_8_r8 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_8_r8 (retarray, array, pdim, back); +#else minloc1_8_r8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_8_s1.c b/libgfortran/generated/minloc1_8_s1.c index 8428db2..b5b4fd5 100644 --- a/libgfortran/generated/minloc1_8_s1.c +++ b/libgfortran/generated/minloc1_8_s1.c @@ -28,7 +28,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + #include <string.h> +#include <assert.h> static inline int compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) @@ -40,14 +43,15 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) } extern void minloc1_8_s1 (gfc_array_i8 * const restrict, - gfc_array_s1 * const restrict, const index_type * const restrict, + gfc_array_s1 * const restrict, const index_type * const restrict , GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(minloc1_8_s1); void minloc1_8_s1 (gfc_array_i8 * const restrict retarray, gfc_array_s1 * const restrict array, - const index_type * const restrict pdim, gfc_charlen_type string_len) + const index_type * const restrict pdim, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -62,6 +66,10 @@ minloc1_8_s1 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -210,14 +218,15 @@ minloc1_8_s1 (gfc_array_i8 * const restrict retarray, extern void mminloc1_8_s1 (gfc_array_i8 * const restrict, gfc_array_s1 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict, gfc_charlen_type); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(mminloc1_8_s1); void mminloc1_8_s1 (gfc_array_i8 * const restrict retarray, gfc_array_s1 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask, gfc_charlen_type string_len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -235,6 +244,9 @@ mminloc1_8_s1 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -411,14 +423,14 @@ mminloc1_8_s1 (gfc_array_i8 * const restrict retarray, extern void sminloc1_8_s1 (gfc_array_i8 * const restrict, gfc_array_s1 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *, gfc_charlen_type); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(sminloc1_8_s1); void sminloc1_8_s1 (gfc_array_i8 * const restrict retarray, gfc_array_s1 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask, gfc_charlen_type string_len) + GFC_LOGICAL_4 * mask , GFC_LOGICAL_4 back, gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -431,7 +443,11 @@ sminloc1_8_s1 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_8_s1 (retarray, array, pdim, back, string_len); +#else minloc1_8_s1 (retarray, array, pdim, string_len); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc1_8_s4.c b/libgfortran/generated/minloc1_8_s4.c index 8042dd2..4181630 100644 --- a/libgfortran/generated/minloc1_8_s4.c +++ b/libgfortran/generated/minloc1_8_s4.c @@ -28,7 +28,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_8) +#define HAVE_BACK_ARG 1 + #include <string.h> +#include <assert.h> static inline int compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) @@ -40,14 +43,15 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) } extern void minloc1_8_s4 (gfc_array_i8 * const restrict, - gfc_array_s4 * const restrict, const index_type * const restrict, + gfc_array_s4 * const restrict, const index_type * const restrict , GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(minloc1_8_s4); void minloc1_8_s4 (gfc_array_i8 * const restrict retarray, gfc_array_s4 * const restrict array, - const index_type * const restrict pdim, gfc_charlen_type string_len) + const index_type * const restrict pdim, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -62,6 +66,10 @@ minloc1_8_s4 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -210,14 +218,15 @@ minloc1_8_s4 (gfc_array_i8 * const restrict retarray, extern void mminloc1_8_s4 (gfc_array_i8 * const restrict, gfc_array_s4 * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict, gfc_charlen_type); + gfc_array_l1 * const restrict, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(mminloc1_8_s4); void mminloc1_8_s4 (gfc_array_i8 * const restrict retarray, gfc_array_s4 * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask, gfc_charlen_type string_len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -235,6 +244,9 @@ mminloc1_8_s4 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -411,14 +423,14 @@ mminloc1_8_s4 (gfc_array_i8 * const restrict retarray, extern void sminloc1_8_s4 (gfc_array_i8 * const restrict, gfc_array_s4 * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *, gfc_charlen_type); + GFC_LOGICAL_4 *, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(sminloc1_8_s4); void sminloc1_8_s4 (gfc_array_i8 * const restrict retarray, gfc_array_s4 * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask, gfc_charlen_type string_len) + GFC_LOGICAL_4 * mask , GFC_LOGICAL_4 back, gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -431,7 +443,11 @@ sminloc1_8_s4 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minloc1_8_s4 (retarray, array, pdim, back, string_len); +#else minloc1_8_s4 (retarray, array, pdim, string_len); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minloc2_16_s1.c b/libgfortran/generated/minloc2_16_s1.c index 841aeeb..3685603 100644 --- a/libgfortran/generated/minloc2_16_s1.c +++ b/libgfortran/generated/minloc2_16_s1.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include <stdlib.h> #include <string.h> +#include <assert.h> #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_16) @@ -38,11 +39,13 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) return memcmp_char4 (a, b, n); } -extern GFC_INTEGER_16 minloc2_16_s1 (gfc_array_s1 * const restrict, gfc_charlen_type); +extern GFC_INTEGER_16 minloc2_16_s1 (gfc_array_s1 * const restrict, GFC_LOGICAL_4 back, + gfc_charlen_type); export_proto(minloc2_16_s1); GFC_INTEGER_16 -minloc2_16_s1 (gfc_array_s1 * const restrict array, gfc_charlen_type len) +minloc2_16_s1 (gfc_array_s1 * const restrict array, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type ret; index_type sstride; @@ -51,6 +54,7 @@ minloc2_16_s1 (gfc_array_s1 * const restrict array, gfc_charlen_type len) const GFC_INTEGER_1 *maxval; index_type i; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -73,12 +77,14 @@ minloc2_16_s1 (gfc_array_s1 * const restrict array, gfc_charlen_type len) } extern GFC_INTEGER_16 mminloc2_16_s1 (gfc_array_s1 * const restrict, - gfc_array_l1 *const restrict mask, gfc_charlen_type); + gfc_array_l1 *const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type); export_proto(mminloc2_16_s1); GFC_INTEGER_16 mminloc2_16_s1 (gfc_array_s1 * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type ret; index_type sstride; @@ -90,6 +96,7 @@ mminloc2_16_s1 (gfc_array_s1 * const restrict array, int mask_kind; index_type mstride; + assert (back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -139,15 +146,15 @@ mminloc2_16_s1 (gfc_array_s1 * const restrict array, } extern GFC_INTEGER_16 sminloc2_16_s1 (gfc_array_s1 * const restrict, - GFC_LOGICAL_4 *mask, gfc_charlen_type); + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(sminloc2_16_s1); GFC_INTEGER_16 sminloc2_16_s1 (gfc_array_s1 * const restrict array, - GFC_LOGICAL_4 *mask, gfc_charlen_type len) + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { if (mask) - return minloc2_16_s1 (array, len); + return minloc2_16_s1 (array, len, back); else return 0; } diff --git a/libgfortran/generated/minloc2_16_s4.c b/libgfortran/generated/minloc2_16_s4.c index 7b71642..256784f 100644 --- a/libgfortran/generated/minloc2_16_s4.c +++ b/libgfortran/generated/minloc2_16_s4.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include <stdlib.h> #include <string.h> +#include <assert.h> #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_16) @@ -38,11 +39,13 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) return memcmp_char4 (a, b, n); } -extern GFC_INTEGER_16 minloc2_16_s4 (gfc_array_s4 * const restrict, gfc_charlen_type); +extern GFC_INTEGER_16 minloc2_16_s4 (gfc_array_s4 * const restrict, GFC_LOGICAL_4 back, + gfc_charlen_type); export_proto(minloc2_16_s4); GFC_INTEGER_16 -minloc2_16_s4 (gfc_array_s4 * const restrict array, gfc_charlen_type len) +minloc2_16_s4 (gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type ret; index_type sstride; @@ -51,6 +54,7 @@ minloc2_16_s4 (gfc_array_s4 * const restrict array, gfc_charlen_type len) const GFC_INTEGER_4 *maxval; index_type i; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -73,12 +77,14 @@ minloc2_16_s4 (gfc_array_s4 * const restrict array, gfc_charlen_type len) } extern GFC_INTEGER_16 mminloc2_16_s4 (gfc_array_s4 * const restrict, - gfc_array_l1 *const restrict mask, gfc_charlen_type); + gfc_array_l1 *const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type); export_proto(mminloc2_16_s4); GFC_INTEGER_16 mminloc2_16_s4 (gfc_array_s4 * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type ret; index_type sstride; @@ -90,6 +96,7 @@ mminloc2_16_s4 (gfc_array_s4 * const restrict array, int mask_kind; index_type mstride; + assert (back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -139,15 +146,15 @@ mminloc2_16_s4 (gfc_array_s4 * const restrict array, } extern GFC_INTEGER_16 sminloc2_16_s4 (gfc_array_s4 * const restrict, - GFC_LOGICAL_4 *mask, gfc_charlen_type); + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(sminloc2_16_s4); GFC_INTEGER_16 sminloc2_16_s4 (gfc_array_s4 * const restrict array, - GFC_LOGICAL_4 *mask, gfc_charlen_type len) + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { if (mask) - return minloc2_16_s4 (array, len); + return minloc2_16_s4 (array, len, back); else return 0; } diff --git a/libgfortran/generated/minloc2_4_s1.c b/libgfortran/generated/minloc2_4_s1.c index d5b88e1..1ba34d1 100644 --- a/libgfortran/generated/minloc2_4_s1.c +++ b/libgfortran/generated/minloc2_4_s1.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include <stdlib.h> #include <string.h> +#include <assert.h> #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_4) @@ -38,11 +39,13 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) return memcmp_char4 (a, b, n); } -extern GFC_INTEGER_4 minloc2_4_s1 (gfc_array_s1 * const restrict, gfc_charlen_type); +extern GFC_INTEGER_4 minloc2_4_s1 (gfc_array_s1 * const restrict, GFC_LOGICAL_4 back, + gfc_charlen_type); export_proto(minloc2_4_s1); GFC_INTEGER_4 -minloc2_4_s1 (gfc_array_s1 * const restrict array, gfc_charlen_type len) +minloc2_4_s1 (gfc_array_s1 * const restrict array, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type ret; index_type sstride; @@ -51,6 +54,7 @@ minloc2_4_s1 (gfc_array_s1 * const restrict array, gfc_charlen_type len) const GFC_INTEGER_1 *maxval; index_type i; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -73,12 +77,14 @@ minloc2_4_s1 (gfc_array_s1 * const restrict array, gfc_charlen_type len) } extern GFC_INTEGER_4 mminloc2_4_s1 (gfc_array_s1 * const restrict, - gfc_array_l1 *const restrict mask, gfc_charlen_type); + gfc_array_l1 *const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type); export_proto(mminloc2_4_s1); GFC_INTEGER_4 mminloc2_4_s1 (gfc_array_s1 * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type ret; index_type sstride; @@ -90,6 +96,7 @@ mminloc2_4_s1 (gfc_array_s1 * const restrict array, int mask_kind; index_type mstride; + assert (back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -139,15 +146,15 @@ mminloc2_4_s1 (gfc_array_s1 * const restrict array, } extern GFC_INTEGER_4 sminloc2_4_s1 (gfc_array_s1 * const restrict, - GFC_LOGICAL_4 *mask, gfc_charlen_type); + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(sminloc2_4_s1); GFC_INTEGER_4 sminloc2_4_s1 (gfc_array_s1 * const restrict array, - GFC_LOGICAL_4 *mask, gfc_charlen_type len) + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { if (mask) - return minloc2_4_s1 (array, len); + return minloc2_4_s1 (array, len, back); else return 0; } diff --git a/libgfortran/generated/minloc2_4_s4.c b/libgfortran/generated/minloc2_4_s4.c index 6213778..cd5053d 100644 --- a/libgfortran/generated/minloc2_4_s4.c +++ b/libgfortran/generated/minloc2_4_s4.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include <stdlib.h> #include <string.h> +#include <assert.h> #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4) @@ -38,11 +39,13 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) return memcmp_char4 (a, b, n); } -extern GFC_INTEGER_4 minloc2_4_s4 (gfc_array_s4 * const restrict, gfc_charlen_type); +extern GFC_INTEGER_4 minloc2_4_s4 (gfc_array_s4 * const restrict, GFC_LOGICAL_4 back, + gfc_charlen_type); export_proto(minloc2_4_s4); GFC_INTEGER_4 -minloc2_4_s4 (gfc_array_s4 * const restrict array, gfc_charlen_type len) +minloc2_4_s4 (gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type ret; index_type sstride; @@ -51,6 +54,7 @@ minloc2_4_s4 (gfc_array_s4 * const restrict array, gfc_charlen_type len) const GFC_INTEGER_4 *maxval; index_type i; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -73,12 +77,14 @@ minloc2_4_s4 (gfc_array_s4 * const restrict array, gfc_charlen_type len) } extern GFC_INTEGER_4 mminloc2_4_s4 (gfc_array_s4 * const restrict, - gfc_array_l1 *const restrict mask, gfc_charlen_type); + gfc_array_l1 *const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type); export_proto(mminloc2_4_s4); GFC_INTEGER_4 mminloc2_4_s4 (gfc_array_s4 * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type ret; index_type sstride; @@ -90,6 +96,7 @@ mminloc2_4_s4 (gfc_array_s4 * const restrict array, int mask_kind; index_type mstride; + assert (back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -139,15 +146,15 @@ mminloc2_4_s4 (gfc_array_s4 * const restrict array, } extern GFC_INTEGER_4 sminloc2_4_s4 (gfc_array_s4 * const restrict, - GFC_LOGICAL_4 *mask, gfc_charlen_type); + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(sminloc2_4_s4); GFC_INTEGER_4 sminloc2_4_s4 (gfc_array_s4 * const restrict array, - GFC_LOGICAL_4 *mask, gfc_charlen_type len) + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { if (mask) - return minloc2_4_s4 (array, len); + return minloc2_4_s4 (array, len, back); else return 0; } diff --git a/libgfortran/generated/minloc2_8_s1.c b/libgfortran/generated/minloc2_8_s1.c index 7aacd28..5c73d89 100644 --- a/libgfortran/generated/minloc2_8_s1.c +++ b/libgfortran/generated/minloc2_8_s1.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include <stdlib.h> #include <string.h> +#include <assert.h> #if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_8) @@ -38,11 +39,13 @@ compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n) return memcmp_char4 (a, b, n); } -extern GFC_INTEGER_8 minloc2_8_s1 (gfc_array_s1 * const restrict, gfc_charlen_type); +extern GFC_INTEGER_8 minloc2_8_s1 (gfc_array_s1 * const restrict, GFC_LOGICAL_4 back, + gfc_charlen_type); export_proto(minloc2_8_s1); GFC_INTEGER_8 -minloc2_8_s1 (gfc_array_s1 * const restrict array, gfc_charlen_type len) +minloc2_8_s1 (gfc_array_s1 * const restrict array, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type ret; index_type sstride; @@ -51,6 +54,7 @@ minloc2_8_s1 (gfc_array_s1 * const restrict array, gfc_charlen_type len) const GFC_INTEGER_1 *maxval; index_type i; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -73,12 +77,14 @@ minloc2_8_s1 (gfc_array_s1 * const restrict array, gfc_charlen_type len) } extern GFC_INTEGER_8 mminloc2_8_s1 (gfc_array_s1 * const restrict, - gfc_array_l1 *const restrict mask, gfc_charlen_type); + gfc_array_l1 *const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type); export_proto(mminloc2_8_s1); GFC_INTEGER_8 mminloc2_8_s1 (gfc_array_s1 * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type ret; index_type sstride; @@ -90,6 +96,7 @@ mminloc2_8_s1 (gfc_array_s1 * const restrict array, int mask_kind; index_type mstride; + assert (back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -139,15 +146,15 @@ mminloc2_8_s1 (gfc_array_s1 * const restrict array, } extern GFC_INTEGER_8 sminloc2_8_s1 (gfc_array_s1 * const restrict, - GFC_LOGICAL_4 *mask, gfc_charlen_type); + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(sminloc2_8_s1); GFC_INTEGER_8 sminloc2_8_s1 (gfc_array_s1 * const restrict array, - GFC_LOGICAL_4 *mask, gfc_charlen_type len) + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { if (mask) - return minloc2_8_s1 (array, len); + return minloc2_8_s1 (array, len, back); else return 0; } diff --git a/libgfortran/generated/minloc2_8_s4.c b/libgfortran/generated/minloc2_8_s4.c index c94bc74..9b40c91 100644 --- a/libgfortran/generated/minloc2_8_s4.c +++ b/libgfortran/generated/minloc2_8_s4.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include <stdlib.h> #include <string.h> +#include <assert.h> #if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_8) @@ -38,11 +39,13 @@ compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n) return memcmp_char4 (a, b, n); } -extern GFC_INTEGER_8 minloc2_8_s4 (gfc_array_s4 * const restrict, gfc_charlen_type); +extern GFC_INTEGER_8 minloc2_8_s4 (gfc_array_s4 * const restrict, GFC_LOGICAL_4 back, + gfc_charlen_type); export_proto(minloc2_8_s4); GFC_INTEGER_8 -minloc2_8_s4 (gfc_array_s4 * const restrict array, gfc_charlen_type len) +minloc2_8_s4 (gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type ret; index_type sstride; @@ -51,6 +54,7 @@ minloc2_8_s4 (gfc_array_s4 * const restrict array, gfc_charlen_type len) const GFC_INTEGER_4 *maxval; index_type i; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -73,12 +77,14 @@ minloc2_8_s4 (gfc_array_s4 * const restrict array, gfc_charlen_type len) } extern GFC_INTEGER_8 mminloc2_8_s4 (gfc_array_s4 * const restrict, - gfc_array_l1 *const restrict mask, gfc_charlen_type); + gfc_array_l1 *const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type); export_proto(mminloc2_8_s4); GFC_INTEGER_8 mminloc2_8_s4 (gfc_array_s4 * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) + gfc_array_l1 * const restrict mask, GFC_LOGICAL_4 back, + gfc_charlen_type len) { index_type ret; index_type sstride; @@ -90,6 +96,7 @@ mminloc2_8_s4 (gfc_array_s4 * const restrict array, int mask_kind; index_type mstride; + assert (back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -139,15 +146,15 @@ mminloc2_8_s4 (gfc_array_s4 * const restrict array, } extern GFC_INTEGER_8 sminloc2_8_s4 (gfc_array_s4 * const restrict, - GFC_LOGICAL_4 *mask, gfc_charlen_type); + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type); export_proto(sminloc2_8_s4); GFC_INTEGER_8 sminloc2_8_s4 (gfc_array_s4 * const restrict array, - GFC_LOGICAL_4 *mask, gfc_charlen_type len) + GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { if (mask) - return minloc2_8_s4 (array, len); + return minloc2_8_s4 (array, len, back); else return 0; } diff --git a/libgfortran/generated/minval_i1.c b/libgfortran/generated/minval_i1.c index f57c5ab..7bb6f81 100644 --- a/libgfortran/generated/minval_i1.c +++ b/libgfortran/generated/minval_i1.c @@ -51,6 +51,10 @@ minval_i1 (gfc_array_i1 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -232,6 +236,9 @@ mminval_i1 (gfc_array_i1 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +448,11 @@ sminval_i1 (gfc_array_i1 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minval_i1 (retarray, array, pdim, back); +#else minval_i1 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minval_i16.c b/libgfortran/generated/minval_i16.c index 11781a6..b2608bc 100644 --- a/libgfortran/generated/minval_i16.c +++ b/libgfortran/generated/minval_i16.c @@ -51,6 +51,10 @@ minval_i16 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -232,6 +236,9 @@ mminval_i16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +448,11 @@ sminval_i16 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minval_i16 (retarray, array, pdim, back); +#else minval_i16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minval_i2.c b/libgfortran/generated/minval_i2.c index b786985..6539ae1 100644 --- a/libgfortran/generated/minval_i2.c +++ b/libgfortran/generated/minval_i2.c @@ -51,6 +51,10 @@ minval_i2 (gfc_array_i2 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -232,6 +236,9 @@ mminval_i2 (gfc_array_i2 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +448,11 @@ sminval_i2 (gfc_array_i2 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minval_i2 (retarray, array, pdim, back); +#else minval_i2 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minval_i4.c b/libgfortran/generated/minval_i4.c index ecd0b4e..e2c16d2 100644 --- a/libgfortran/generated/minval_i4.c +++ b/libgfortran/generated/minval_i4.c @@ -51,6 +51,10 @@ minval_i4 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -232,6 +236,9 @@ mminval_i4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +448,11 @@ sminval_i4 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minval_i4 (retarray, array, pdim, back); +#else minval_i4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minval_i8.c b/libgfortran/generated/minval_i8.c index a4e8f78..9caafd9 100644 --- a/libgfortran/generated/minval_i8.c +++ b/libgfortran/generated/minval_i8.c @@ -51,6 +51,10 @@ minval_i8 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -232,6 +236,9 @@ mminval_i8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +448,11 @@ sminval_i8 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minval_i8 (retarray, array, pdim, back); +#else minval_i8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minval_r10.c b/libgfortran/generated/minval_r10.c index 0ac2185..308f64b 100644 --- a/libgfortran/generated/minval_r10.c +++ b/libgfortran/generated/minval_r10.c @@ -51,6 +51,10 @@ minval_r10 (gfc_array_r10 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -232,6 +236,9 @@ mminval_r10 (gfc_array_r10 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +448,11 @@ sminval_r10 (gfc_array_r10 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minval_r10 (retarray, array, pdim, back); +#else minval_r10 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minval_r16.c b/libgfortran/generated/minval_r16.c index bee1289..948aee0 100644 --- a/libgfortran/generated/minval_r16.c +++ b/libgfortran/generated/minval_r16.c @@ -51,6 +51,10 @@ minval_r16 (gfc_array_r16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -232,6 +236,9 @@ mminval_r16 (gfc_array_r16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +448,11 @@ sminval_r16 (gfc_array_r16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minval_r16 (retarray, array, pdim, back); +#else minval_r16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minval_r4.c b/libgfortran/generated/minval_r4.c index d47a9c8..b52a3e8 100644 --- a/libgfortran/generated/minval_r4.c +++ b/libgfortran/generated/minval_r4.c @@ -51,6 +51,10 @@ minval_r4 (gfc_array_r4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -232,6 +236,9 @@ mminval_r4 (gfc_array_r4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +448,11 @@ sminval_r4 (gfc_array_r4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minval_r4 (retarray, array, pdim, back); +#else minval_r4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/minval_r8.c b/libgfortran/generated/minval_r8.c index 0552847..34caf05 100644 --- a/libgfortran/generated/minval_r8.c +++ b/libgfortran/generated/minval_r8.c @@ -51,6 +51,10 @@ minval_r8 (gfc_array_r8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -232,6 +236,9 @@ mminval_r8 (gfc_array_r8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -441,7 +448,11 @@ sminval_r8 (gfc_array_r8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + minval_r8 (retarray, array, pdim, back); +#else minval_r8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/norm2_r10.c b/libgfortran/generated/norm2_r10.c index 37b3a87..b6e5a4a 100644 --- a/libgfortran/generated/norm2_r10.c +++ b/libgfortran/generated/norm2_r10.c @@ -54,6 +54,10 @@ norm2_r10 (gfc_array_r10 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; diff --git a/libgfortran/generated/norm2_r16.c b/libgfortran/generated/norm2_r16.c index faa06ba..32237db 100644 --- a/libgfortran/generated/norm2_r16.c +++ b/libgfortran/generated/norm2_r16.c @@ -58,6 +58,10 @@ norm2_r16 (gfc_array_r16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; diff --git a/libgfortran/generated/norm2_r4.c b/libgfortran/generated/norm2_r4.c index 22a006b..504d313 100644 --- a/libgfortran/generated/norm2_r4.c +++ b/libgfortran/generated/norm2_r4.c @@ -54,6 +54,10 @@ norm2_r4 (gfc_array_r4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; diff --git a/libgfortran/generated/norm2_r8.c b/libgfortran/generated/norm2_r8.c index 7b2a5ae..60e707f 100644 --- a/libgfortran/generated/norm2_r8.c +++ b/libgfortran/generated/norm2_r8.c @@ -54,6 +54,10 @@ norm2_r8 (gfc_array_r8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; diff --git a/libgfortran/generated/parity_l1.c b/libgfortran/generated/parity_l1.c index fe4e5c8..2920799 100644 --- a/libgfortran/generated/parity_l1.c +++ b/libgfortran/generated/parity_l1.c @@ -51,6 +51,10 @@ parity_l1 (gfc_array_l1 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; diff --git a/libgfortran/generated/parity_l16.c b/libgfortran/generated/parity_l16.c index b74882c..c1ac0b2 100644 --- a/libgfortran/generated/parity_l16.c +++ b/libgfortran/generated/parity_l16.c @@ -51,6 +51,10 @@ parity_l16 (gfc_array_l16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; diff --git a/libgfortran/generated/parity_l2.c b/libgfortran/generated/parity_l2.c index 9c0b0eb..c588e72 100644 --- a/libgfortran/generated/parity_l2.c +++ b/libgfortran/generated/parity_l2.c @@ -51,6 +51,10 @@ parity_l2 (gfc_array_l2 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; diff --git a/libgfortran/generated/parity_l4.c b/libgfortran/generated/parity_l4.c index 7506605..0acb039 100644 --- a/libgfortran/generated/parity_l4.c +++ b/libgfortran/generated/parity_l4.c @@ -51,6 +51,10 @@ parity_l4 (gfc_array_l4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; diff --git a/libgfortran/generated/parity_l8.c b/libgfortran/generated/parity_l8.c index 273c272..84623df 100644 --- a/libgfortran/generated/parity_l8.c +++ b/libgfortran/generated/parity_l8.c @@ -51,6 +51,10 @@ parity_l8 (gfc_array_l8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; diff --git a/libgfortran/generated/product_c10.c b/libgfortran/generated/product_c10.c index d78bab9..38e8251 100644 --- a/libgfortran/generated/product_c10.c +++ b/libgfortran/generated/product_c10.c @@ -51,6 +51,10 @@ product_c10 (gfc_array_c10 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ mproduct_c10 (gfc_array_c10 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ sproduct_c10 (gfc_array_c10 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + product_c10 (retarray, array, pdim, back); +#else product_c10 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/product_c16.c b/libgfortran/generated/product_c16.c index 7b6b1ee..d1c04ec 100644 --- a/libgfortran/generated/product_c16.c +++ b/libgfortran/generated/product_c16.c @@ -51,6 +51,10 @@ product_c16 (gfc_array_c16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ mproduct_c16 (gfc_array_c16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ sproduct_c16 (gfc_array_c16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + product_c16 (retarray, array, pdim, back); +#else product_c16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/product_c4.c b/libgfortran/generated/product_c4.c index ddb28bc..d19cfaf 100644 --- a/libgfortran/generated/product_c4.c +++ b/libgfortran/generated/product_c4.c @@ -51,6 +51,10 @@ product_c4 (gfc_array_c4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ mproduct_c4 (gfc_array_c4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ sproduct_c4 (gfc_array_c4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + product_c4 (retarray, array, pdim, back); +#else product_c4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/product_c8.c b/libgfortran/generated/product_c8.c index e1705bc..ed1e12a 100644 --- a/libgfortran/generated/product_c8.c +++ b/libgfortran/generated/product_c8.c @@ -51,6 +51,10 @@ product_c8 (gfc_array_c8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ mproduct_c8 (gfc_array_c8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ sproduct_c8 (gfc_array_c8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + product_c8 (retarray, array, pdim, back); +#else product_c8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/product_i1.c b/libgfortran/generated/product_i1.c index 38f6f21..2e86e99 100644 --- a/libgfortran/generated/product_i1.c +++ b/libgfortran/generated/product_i1.c @@ -51,6 +51,10 @@ product_i1 (gfc_array_i1 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ mproduct_i1 (gfc_array_i1 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ sproduct_i1 (gfc_array_i1 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + product_i1 (retarray, array, pdim, back); +#else product_i1 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/product_i16.c b/libgfortran/generated/product_i16.c index 58c51fb..f23890e 100644 --- a/libgfortran/generated/product_i16.c +++ b/libgfortran/generated/product_i16.c @@ -51,6 +51,10 @@ product_i16 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ mproduct_i16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ sproduct_i16 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + product_i16 (retarray, array, pdim, back); +#else product_i16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/product_i2.c b/libgfortran/generated/product_i2.c index b91ca75..762e548 100644 --- a/libgfortran/generated/product_i2.c +++ b/libgfortran/generated/product_i2.c @@ -51,6 +51,10 @@ product_i2 (gfc_array_i2 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ mproduct_i2 (gfc_array_i2 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ sproduct_i2 (gfc_array_i2 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + product_i2 (retarray, array, pdim, back); +#else product_i2 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/product_i4.c b/libgfortran/generated/product_i4.c index 246dc7e..ecf0470 100644 --- a/libgfortran/generated/product_i4.c +++ b/libgfortran/generated/product_i4.c @@ -51,6 +51,10 @@ product_i4 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ mproduct_i4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ sproduct_i4 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + product_i4 (retarray, array, pdim, back); +#else product_i4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/product_i8.c b/libgfortran/generated/product_i8.c index a0e264f..a9530ec 100644 --- a/libgfortran/generated/product_i8.c +++ b/libgfortran/generated/product_i8.c @@ -51,6 +51,10 @@ product_i8 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ mproduct_i8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ sproduct_i8 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + product_i8 (retarray, array, pdim, back); +#else product_i8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/product_r10.c b/libgfortran/generated/product_r10.c index decefd7..613ed18 100644 --- a/libgfortran/generated/product_r10.c +++ b/libgfortran/generated/product_r10.c @@ -51,6 +51,10 @@ product_r10 (gfc_array_r10 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ mproduct_r10 (gfc_array_r10 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ sproduct_r10 (gfc_array_r10 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + product_r10 (retarray, array, pdim, back); +#else product_r10 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/product_r16.c b/libgfortran/generated/product_r16.c index 66f3ef9..9befd51 100644 --- a/libgfortran/generated/product_r16.c +++ b/libgfortran/generated/product_r16.c @@ -51,6 +51,10 @@ product_r16 (gfc_array_r16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ mproduct_r16 (gfc_array_r16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ sproduct_r16 (gfc_array_r16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + product_r16 (retarray, array, pdim, back); +#else product_r16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/product_r4.c b/libgfortran/generated/product_r4.c index 0f5f1f5..5e356ee 100644 --- a/libgfortran/generated/product_r4.c +++ b/libgfortran/generated/product_r4.c @@ -51,6 +51,10 @@ product_r4 (gfc_array_r4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ mproduct_r4 (gfc_array_r4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ sproduct_r4 (gfc_array_r4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + product_r4 (retarray, array, pdim, back); +#else product_r4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/product_r8.c b/libgfortran/generated/product_r8.c index 75ed99c..4e98cfa 100644 --- a/libgfortran/generated/product_r8.c +++ b/libgfortran/generated/product_r8.c @@ -51,6 +51,10 @@ product_r8 (gfc_array_r8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ mproduct_r8 (gfc_array_r8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ sproduct_r8 (gfc_array_r8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + product_r8 (retarray, array, pdim, back); +#else product_r8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/sum_c10.c b/libgfortran/generated/sum_c10.c index 9083745..6923594 100644 --- a/libgfortran/generated/sum_c10.c +++ b/libgfortran/generated/sum_c10.c @@ -51,6 +51,10 @@ sum_c10 (gfc_array_c10 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ msum_c10 (gfc_array_c10 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ ssum_c10 (gfc_array_c10 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + sum_c10 (retarray, array, pdim, back); +#else sum_c10 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/sum_c16.c b/libgfortran/generated/sum_c16.c index 15c2d6b..4ed50d0 100644 --- a/libgfortran/generated/sum_c16.c +++ b/libgfortran/generated/sum_c16.c @@ -51,6 +51,10 @@ sum_c16 (gfc_array_c16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ msum_c16 (gfc_array_c16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ ssum_c16 (gfc_array_c16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + sum_c16 (retarray, array, pdim, back); +#else sum_c16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/sum_c4.c b/libgfortran/generated/sum_c4.c index 654ed60..9d5516a 100644 --- a/libgfortran/generated/sum_c4.c +++ b/libgfortran/generated/sum_c4.c @@ -51,6 +51,10 @@ sum_c4 (gfc_array_c4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ msum_c4 (gfc_array_c4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ ssum_c4 (gfc_array_c4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + sum_c4 (retarray, array, pdim, back); +#else sum_c4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/sum_c8.c b/libgfortran/generated/sum_c8.c index 1313c5d..84684cb 100644 --- a/libgfortran/generated/sum_c8.c +++ b/libgfortran/generated/sum_c8.c @@ -51,6 +51,10 @@ sum_c8 (gfc_array_c8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ msum_c8 (gfc_array_c8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ ssum_c8 (gfc_array_c8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + sum_c8 (retarray, array, pdim, back); +#else sum_c8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/sum_i1.c b/libgfortran/generated/sum_i1.c index a6d3043..f440702 100644 --- a/libgfortran/generated/sum_i1.c +++ b/libgfortran/generated/sum_i1.c @@ -51,6 +51,10 @@ sum_i1 (gfc_array_i1 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ msum_i1 (gfc_array_i1 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ ssum_i1 (gfc_array_i1 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + sum_i1 (retarray, array, pdim, back); +#else sum_i1 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/sum_i16.c b/libgfortran/generated/sum_i16.c index d8f80b0..570f8f2 100644 --- a/libgfortran/generated/sum_i16.c +++ b/libgfortran/generated/sum_i16.c @@ -51,6 +51,10 @@ sum_i16 (gfc_array_i16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ msum_i16 (gfc_array_i16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ ssum_i16 (gfc_array_i16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + sum_i16 (retarray, array, pdim, back); +#else sum_i16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/sum_i2.c b/libgfortran/generated/sum_i2.c index 49209c4..ea70d50 100644 --- a/libgfortran/generated/sum_i2.c +++ b/libgfortran/generated/sum_i2.c @@ -51,6 +51,10 @@ sum_i2 (gfc_array_i2 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ msum_i2 (gfc_array_i2 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ ssum_i2 (gfc_array_i2 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + sum_i2 (retarray, array, pdim, back); +#else sum_i2 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/sum_i4.c b/libgfortran/generated/sum_i4.c index 39954d1..4915ec9 100644 --- a/libgfortran/generated/sum_i4.c +++ b/libgfortran/generated/sum_i4.c @@ -51,6 +51,10 @@ sum_i4 (gfc_array_i4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ msum_i4 (gfc_array_i4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ ssum_i4 (gfc_array_i4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + sum_i4 (retarray, array, pdim, back); +#else sum_i4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/sum_i8.c b/libgfortran/generated/sum_i8.c index 6fb7d9b..53f6ec2 100644 --- a/libgfortran/generated/sum_i8.c +++ b/libgfortran/generated/sum_i8.c @@ -51,6 +51,10 @@ sum_i8 (gfc_array_i8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ msum_i8 (gfc_array_i8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ ssum_i8 (gfc_array_i8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + sum_i8 (retarray, array, pdim, back); +#else sum_i8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/sum_r10.c b/libgfortran/generated/sum_r10.c index dcafdec8..9552ed8 100644 --- a/libgfortran/generated/sum_r10.c +++ b/libgfortran/generated/sum_r10.c @@ -51,6 +51,10 @@ sum_r10 (gfc_array_r10 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ msum_r10 (gfc_array_r10 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ ssum_r10 (gfc_array_r10 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + sum_r10 (retarray, array, pdim, back); +#else sum_r10 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/sum_r16.c b/libgfortran/generated/sum_r16.c index e230e61..6c83206 100644 --- a/libgfortran/generated/sum_r16.c +++ b/libgfortran/generated/sum_r16.c @@ -51,6 +51,10 @@ sum_r16 (gfc_array_r16 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ msum_r16 (gfc_array_r16 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ ssum_r16 (gfc_array_r16 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + sum_r16 (retarray, array, pdim, back); +#else sum_r16 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/sum_r4.c b/libgfortran/generated/sum_r4.c index a2bca49..1595336 100644 --- a/libgfortran/generated/sum_r4.c +++ b/libgfortran/generated/sum_r4.c @@ -51,6 +51,10 @@ sum_r4 (gfc_array_r4 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ msum_r4 (gfc_array_r4 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ ssum_r4 (gfc_array_r4 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + sum_r4 (retarray, array, pdim, back); +#else sum_r4 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/generated/sum_r8.c b/libgfortran/generated/sum_r8.c index 7c2836e..7c8a186 100644 --- a/libgfortran/generated/sum_r8.c +++ b/libgfortran/generated/sum_r8.c @@ -51,6 +51,10 @@ sum_r8 (gfc_array_r8 * const restrict retarray, index_type dim; int continue_loop; +#ifdef HAVE_BACK_ARG + assert(back == 0); +#endif + /* Make dim zero based to avoid confusion. */ rank = GFC_DESCRIPTOR_RANK (array) - 1; dim = (*pdim) - 1; @@ -218,6 +222,9 @@ msum_r8 (gfc_array_r8 * const restrict retarray, index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -399,7 +406,11 @@ ssum_r8 (gfc_array_r8 * const restrict retarray, if (*mask) { +#ifdef HAVE_BACK_ARG + sum_r8 (retarray, array, pdim, back); +#else sum_r8 (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ |