From: Thomas Koenig Date: Mon, 15 Jan 2018 18:35:13 +0000 (+0000) Subject: re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=64b1806b2d94fd325759761b64fb7507ca83d5d2;p=gcc.git re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-01-15 Thomas Koenig 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 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 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 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 75331718092..453dc74ed66 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,29 @@ +2018-01-15 Thomas Koenig + + 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-13 Jerry DeLisle PR fortran/82007 @@ -6,7 +32,7 @@ format string or format label is present. * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix whitespace. - + 2018-01-13 Thomas Koenig PR fortran/83744 diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index fccb9275bec..a2c8b520d80 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -3265,12 +3265,13 @@ gfc_check_matmul (gfc_expr *matrix_a, gfc_expr *matrix_b) DIM MASK I.e. in the case of minloc(array,mask), mask will be in the second - position of the argument list and we'll have to fix that up. */ + position of the argument list and we'll have to fix that up. Also, + add the BACK argument if that isn't present. */ bool gfc_check_minloc_maxloc (gfc_actual_arglist *ap) { - gfc_expr *a, *m, *d, *k; + gfc_expr *a, *m, *d, *k, *b; a = ap->expr; if (!int_or_real_or_char_check_f2003 (a, 0) || !array_check (a, 0)) @@ -3279,6 +3280,26 @@ gfc_check_minloc_maxloc (gfc_actual_arglist *ap) d = ap->next->expr; m = ap->next->next->expr; k = ap->next->next->next->expr; + b = ap->next->next->next->next->expr; + + if (b) + { + if (!type_check (b, 4, BT_LOGICAL) || !scalar_check (b,4)) + return false; + + /* TODO: Remove this once BACK is actually implemented. */ + if (b->expr_type != EXPR_CONSTANT || b->value.logical != 0) + { + gfc_error ("BACK argument to %qs intrinsic not yet " + "implemented", gfc_current_intrinsic); + return false; + } + } + else + { + b = gfc_get_logical_expr (gfc_default_logical_kind, NULL, 0); + ap->next->next->next->next->expr = b; + } if (m == NULL && d != NULL && d->ts.type == BT_LOGICAL && ap->next->name == NULL) diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index b3f8e423efe..6ddf450ad2e 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -1999,7 +1999,7 @@ typedef union bool (*f1m)(gfc_actual_arglist *); bool (*f2)(struct gfc_expr *, struct gfc_expr *); bool (*f3)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *); - bool (*f4ml)(gfc_actual_arglist *); + bool (*f5ml)(gfc_actual_arglist *); bool (*f3red)(gfc_actual_arglist *); bool (*f4)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *, struct gfc_expr *); @@ -2915,6 +2915,8 @@ extern int gfc_size_kind; extern int gfc_numeric_storage_size; extern int gfc_character_storage_size; +#define gfc_logical_4_kind 4 + /* symbol.c */ void gfc_clear_new_implicit (void); bool gfc_add_new_implicit_range (int, int); diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index ed732aa5252..4844cee0c34 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -687,29 +687,33 @@ add_sym_3 (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt ty might have to be reordered. */ static void -add_sym_4ml (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type, +add_sym_5ml (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type, int kind, int standard, bool (*check) (gfc_actual_arglist *), - gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *), - void (*resolve) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *), + gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *, + gfc_expr *, gfc_expr *), + void (*resolve) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *, + gfc_expr *, gfc_expr *), const char *a1, bt type1, int kind1, int optional1, const char *a2, bt type2, int kind2, int optional2, const char *a3, bt type3, int kind3, int optional3, - const char *a4, bt type4, int kind4, int optional4) + const char *a4, bt type4, int kind4, int optional4, + const char *a5, bt type5, int kind5, int optional5) { gfc_check_f cf; gfc_simplify_f sf; gfc_resolve_f rf; - cf.f4ml = check; - sf.f4 = simplify; - rf.f4 = resolve; + cf.f5ml = check; + sf.f5 = simplify; + rf.f5 = resolve; add_sym (name, id, cl, actual_ok, type, kind, standard, cf, sf, rf, a1, type1, kind1, optional1, INTENT_IN, a2, type2, kind2, optional2, INTENT_IN, a3, type3, kind3, optional3, INTENT_IN, a4, type4, kind4, optional4, INTENT_IN, + a5, type5, kind5, optional5, INTENT_IN, (void *) 0); } @@ -1242,7 +1246,7 @@ add_functions (void) *num = "number", *tm = "time", *nm = "name", *md = "mode", *vl = "values", *p1 = "path1", *p2 = "path2", *com = "command", *ca = "coarray", *sub = "sub", *dist = "distance", *failed="failed", - *c_ptr_1 = "c_ptr_1", *c_ptr_2 = "c_ptr_2"; + *c_ptr_1 = "c_ptr_1", *c_ptr_2 = "c_ptr_2", *back = "back"; int di, dr, dd, dl, dc, dz, ii; @@ -2457,10 +2461,11 @@ add_functions (void) make_generic ("maxexponent", GFC_ISYM_MAXEXPONENT, GFC_STD_F95); - add_sym_4ml ("maxloc", GFC_ISYM_MAXLOC, CLASS_TRANSFORMATIONAL, ACTUAL_NO, BT_INTEGER, di, GFC_STD_F95, + add_sym_5ml ("maxloc", GFC_ISYM_MAXLOC, CLASS_TRANSFORMATIONAL, ACTUAL_NO, BT_INTEGER, di, GFC_STD_F95, gfc_check_minloc_maxloc, gfc_simplify_maxloc, gfc_resolve_maxloc, ar, BT_REAL, dr, REQUIRED, dm, BT_INTEGER, ii, OPTIONAL, - msk, BT_LOGICAL, dl, OPTIONAL, kind, BT_INTEGER, di, OPTIONAL); + msk, BT_LOGICAL, dl, OPTIONAL, kind, BT_INTEGER, di, OPTIONAL, + back, BT_LOGICAL, dl, OPTIONAL); make_generic ("maxloc", GFC_ISYM_MAXLOC, GFC_STD_F95); @@ -2533,11 +2538,12 @@ add_functions (void) make_generic ("minexponent", GFC_ISYM_MINEXPONENT, GFC_STD_F95); - add_sym_4ml ("minloc", GFC_ISYM_MINLOC, CLASS_TRANSFORMATIONAL, ACTUAL_NO, BT_INTEGER, di, GFC_STD_F95, + add_sym_5ml ("minloc", GFC_ISYM_MINLOC, CLASS_TRANSFORMATIONAL, ACTUAL_NO, BT_INTEGER, di, GFC_STD_F95, gfc_check_minloc_maxloc, gfc_simplify_minloc, gfc_resolve_minloc, ar, BT_REAL, dr, REQUIRED, dm, BT_INTEGER, ii, OPTIONAL, - msk, BT_LOGICAL, dl, OPTIONAL, kind, BT_INTEGER, di, OPTIONAL); - + msk, BT_LOGICAL, dl, OPTIONAL, kind, BT_INTEGER, di, OPTIONAL, + back, BT_LOGICAL, dl, OPTIONAL); + make_generic ("minloc", GFC_ISYM_MINLOC, GFC_STD_F95); add_sym_3red ("minval", GFC_ISYM_MINVAL, CLASS_TRANSFORMATIONAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_F95, @@ -4500,7 +4506,7 @@ check_specific (gfc_intrinsic_sym *specific, gfc_expr *expr, int error_flag) if (!do_ts29113_check (specific, *ap)) return false; - if (specific->check.f4ml == gfc_check_minloc_maxloc) + if (specific->check.f5ml == gfc_check_minloc_maxloc) /* This is special because we might have to reorder the argument list. */ t = gfc_check_minloc_maxloc (*ap); else if (specific->check.f3red == gfc_check_minval_maxval) diff --git a/gcc/fortran/intrinsic.h b/gcc/fortran/intrinsic.h index a7db830d381..7615dd1e611 100644 --- a/gcc/fortran/intrinsic.h +++ b/gcc/fortran/intrinsic.h @@ -348,10 +348,12 @@ gfc_expr *gfc_simplify_maskr (gfc_expr *, gfc_expr *); gfc_expr *gfc_simplify_merge (gfc_expr *, gfc_expr *, gfc_expr *); gfc_expr *gfc_simplify_merge_bits (gfc_expr *, gfc_expr *, gfc_expr *); gfc_expr *gfc_simplify_min (gfc_expr *); -gfc_expr *gfc_simplify_minloc (gfc_expr*, gfc_expr *, gfc_expr *, gfc_expr *); +gfc_expr *gfc_simplify_minloc (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *, + gfc_expr *); gfc_expr *gfc_simplify_minval (gfc_expr *, gfc_expr*, gfc_expr*); gfc_expr *gfc_simplify_max (gfc_expr *); -gfc_expr *gfc_simplify_maxloc (gfc_expr*, gfc_expr *, gfc_expr *, gfc_expr *); +gfc_expr *gfc_simplify_maxloc (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *, + gfc_expr *); gfc_expr *gfc_simplify_maxval (gfc_expr *, gfc_expr*, gfc_expr*); gfc_expr *gfc_simplify_maxexponent (gfc_expr *); gfc_expr *gfc_simplify_minexponent (gfc_expr *); @@ -540,7 +542,7 @@ void gfc_resolve_logical (gfc_expr *, gfc_expr *, gfc_expr *); void gfc_resolve_lstat (gfc_expr *, gfc_expr *, gfc_expr *); void gfc_resolve_matmul (gfc_expr *, gfc_expr *, gfc_expr *); void gfc_resolve_max (gfc_expr *, gfc_actual_arglist *); -void gfc_resolve_maxloc (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *); +void gfc_resolve_maxloc (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *); void gfc_resolve_maxval (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *); void gfc_resolve_mclock (gfc_expr *); void gfc_resolve_mclock8 (gfc_expr *); @@ -548,7 +550,7 @@ void gfc_resolve_mask (gfc_expr *, gfc_expr *, gfc_expr *); void gfc_resolve_merge (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *); void gfc_resolve_merge_bits (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *); void gfc_resolve_min (gfc_expr *, gfc_actual_arglist *); -void gfc_resolve_minloc (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *); +void gfc_resolve_minloc (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *); void gfc_resolve_minval (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *); void gfc_resolve_mod (gfc_expr *, gfc_expr *, gfc_expr *); void gfc_resolve_modulo (gfc_expr *, gfc_expr *, gfc_expr *); diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c index 11f256919b9..9a4e199d01e 100644 --- a/gcc/fortran/iresolve.c +++ b/gcc/fortran/iresolve.c @@ -1697,7 +1697,7 @@ gfc_resolve_max (gfc_expr *f, gfc_actual_arglist *args) void gfc_resolve_maxloc (gfc_expr *f, gfc_expr *array, gfc_expr *dim, - gfc_expr *mask, gfc_expr *kind) + gfc_expr *mask, gfc_expr *kind, gfc_expr *back) { const char *name; int i, j, idim; @@ -1781,6 +1781,15 @@ gfc_resolve_maxloc (gfc_expr *f, gfc_expr *array, gfc_expr *dim, ts.kind = fkind; gfc_convert_type_warn (f, &ts, 2, 0); } + + if (back->ts.kind != gfc_logical_4_kind) + { + gfc_typespec ts; + gfc_clear_ts (&ts); + ts.type = BT_LOGICAL; + ts.kind = gfc_logical_4_kind; + gfc_convert_type_warn (back, &ts, 2, 0); + } } @@ -1907,7 +1916,7 @@ gfc_resolve_min (gfc_expr *f, gfc_actual_arglist *args) void gfc_resolve_minloc (gfc_expr *f, gfc_expr *array, gfc_expr *dim, - gfc_expr *mask, gfc_expr *kind) + gfc_expr *mask, gfc_expr *kind, gfc_expr *back) { const char *name; int i, j, idim; @@ -1986,6 +1995,15 @@ gfc_resolve_minloc (gfc_expr *f, gfc_expr *array, gfc_expr *dim, ts.kind = fkind; gfc_convert_type_warn (f, &ts, 2, 0); } + + if (back->ts.kind != gfc_logical_4_kind) + { + gfc_typespec ts; + gfc_clear_ts (&ts); + ts.type = BT_LOGICAL; + ts.kind = gfc_logical_4_kind; + gfc_convert_type_warn (back, &ts, 2, 0); + } } diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index 3e5abd44cc6..b7c6b02081f 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -5343,13 +5343,15 @@ gfc_simplify_minmaxloc (gfc_expr *array, gfc_expr *dim, gfc_expr *mask, } gfc_expr * -gfc_simplify_minloc (gfc_expr *array, gfc_expr *dim, gfc_expr *mask, gfc_expr *kind) +gfc_simplify_minloc (gfc_expr *array, gfc_expr *dim, gfc_expr *mask, gfc_expr *kind, + gfc_expr *back ATTRIBUTE_UNUSED) { return gfc_simplify_minmaxloc (array, dim, mask, kind, -1); } gfc_expr * -gfc_simplify_maxloc (gfc_expr *array, gfc_expr *dim, gfc_expr *mask, gfc_expr *kind) +gfc_simplify_maxloc (gfc_expr *array, gfc_expr *dim, gfc_expr *mask, gfc_expr *kind, + gfc_expr *back ATTRIBUTE_UNUSED) { return gfc_simplify_minmaxloc (array, dim, mask, kind, 1); } diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index 7fe8286a0a9..f4defb079b4 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -4562,13 +4562,22 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, enum tree_code op) tree pos; int n; + actual = expr->value.function.actual; + + /* The last argument, BACK, is passed by value. Ensure that + by setting its name to %VAL. */ + for (gfc_actual_arglist *a = actual; a; a = a->next) + { + if (a->next == NULL) + a->name = "%VAL"; + } + if (se->ss) { gfc_conv_intrinsic_funcall (se, expr); return; } - actual = expr->value.function.actual; arrayexpr = actual->expr; /* Special case for character maxloc. Remove unneeded actual @@ -4576,22 +4585,19 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, enum tree_code op) if (arrayexpr->ts.type == BT_CHARACTER) { - gfc_actual_arglist *a2, *a3, *a4; - a2 = actual->next; - a3 = a2->next; - a4 = a3->next; - a4->next = NULL; - if (a3->expr == NULL) - { - actual->next = NULL; - gfc_free_actual_arglist (a2); - } - else + gfc_actual_arglist *a, *b; + a = actual; + while (a->next) { - actual->next = a3; /* dim */ - a3->next = NULL; - a2->next = a4; - gfc_free_actual_arglist (a4); + b = a->next; + if (b->expr == NULL || strcmp (b->name, "dim") == 0) + { + a->next = b->next; + b->next = NULL; + gfc_free_actual_arglist (b); + } + else + a = b; } gfc_conv_intrinsic_funcall (se, expr); return; @@ -8647,6 +8653,14 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr) conv_generic_with_optional_char_arg (se, expr, 1, 3); break; + case GFC_ISYM_MINLOC: + gfc_conv_intrinsic_minmaxloc (se, expr, LT_EXPR); + break; + + case GFC_ISYM_MAXLOC: + gfc_conv_intrinsic_minmaxloc (se, expr, GT_EXPR); + break; + default: gfc_conv_intrinsic_funcall (se, expr); break; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9f1742ef9c9..382ec746bd7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2018-01-15 Thomas Koenig + + PR fortran/54613 + * gfortran.dg/minmaxloc_9.f90: New test. + * gfortran.dg/minmaxloc_10.f90: New test. + * gfortran.dg/minmaxloc_11.f90: New test. + 2018-01-15 H.J. Lu PR target/83839 diff --git a/gcc/testsuite/gfortran.dg/minmaxloc_10.f90 b/gcc/testsuite/gfortran.dg/minmaxloc_10.f90 new file mode 100644 index 00000000000..932a40be266 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/minmaxloc_10.f90 @@ -0,0 +1,118 @@ +! { dg-do run } +! { dg-additional-options "-fdefault-integer-8" } +! Check max/minloc with eight-bytes logicals. +! +program test + implicit none + integer :: i(1), j(-1:1), res(1) + logical, volatile :: m(3), m2(3) + m = (/ .false., .false., .false. /) + m2 = (/ .false., .true., .false. /) + call check(1, 0, MAXLOC((/ 42, 23, 11 /), DIM=1, MASK=.FALSE.)) + call check(2, 0, MAXLOC((/ 42, 23, 11 /), DIM=1, MASK=m)) + call check(3, 2, MAXLOC((/ 42, 23, 11 /), DIM=1, MASK=m2)) + call check(4, 0, MAXLOC(i(1:0), DIM=1, MASK=.TRUE.)) + call check(5, 0, MAXLOC(i(1:0), DIM=1, MASK=.FALSE.)) + call check(6, 0, MAXLOC(i(1:0), DIM=1, MASK=m(1:0))) + call check(7, 0, MAXLOC(i(1:0), DIM=1)) + call check(8, 0, MINLOC((/ 42, 23, 11 /), DIM=1, MASK=.FALSE.)) + call check(9, 0, MINLOC((/ 42, 23, 11 /), DIM=1, MASK=m)) + call check(10, 0, MINLOC(i(1:0), DIM=1, MASK=.FALSE.)) + call check(11,0, MINLOC(i(1:0), DIM=1, MASK=m(1:0))) + call check(12,0, MINLOC(i(1:0), DIM=1, MASK=.TRUE.)) + call check(13,0, MINLOC(i(1:0), DIM=1)) + + j = (/ 1, 2, 1 /); call check(14, 2, MAXLOC(j, DIM=1)) + j = (/ 1, 2, 3 /); call check(15, 3, MAXLOC(j, DIM=1)) + j = (/ 3, 2, 1 /); call check(16, 1, MAXLOC(j, DIM=1)) + j = (/ 1, 2, 1 /); call check(17, 1, MINLOC(j, DIM=1)) + j = (/ 1, 2, 3 /); call check(18, 1, MINLOC(j, DIM=1)) + j = (/ 3, 2, 1 /); call check(19, 3, MINLOC(j, DIM=1)) + + j = (/ 1, 2, 1 /); call check(20, 2, MAXLOC(j, DIM=1,mask=.true.)) + j = (/ 1, 2, 3 /); call check(21, 3, MAXLOC(j, DIM=1,mask=.true.)) + j = (/ 3, 2, 1 /); call check(22, 1, MAXLOC(j, DIM=1,mask=.true.)) + j = (/ 1, 2, 1 /); call check(23, 1, MINLOC(j, DIM=1,mask=.true.)) + j = (/ 1, 2, 3 /); call check(24, 1, MINLOC(j, DIM=1,mask=.true.)) + j = (/ 3, 2, 1 /); call check(25, 3, MINLOC(j, DIM=1,mask=.true.)) + + j = (/ 1, 2, 1 /); call check(26, 0, MAXLOC(j, DIM=1,mask=.false.)) + j = (/ 1, 2, 3 /); call check(27, 0, MAXLOC(j, DIM=1,mask=.false.)) + j = (/ 3, 2, 1 /); call check(28, 0, MAXLOC(j, DIM=1,mask=.false.)) + j = (/ 1, 2, 1 /); call check(29, 0, MINLOC(j, DIM=1,mask=.false.)) + j = (/ 1, 2, 3 /); call check(30, 0, MINLOC(j, DIM=1,mask=.false.)) + j = (/ 3, 2, 1 /); call check(31, 0, MINLOC(j, DIM=1,mask=.false.)) + + j = (/ 1, 2, 1 /); call check(32, 0, MAXLOC(j, DIM=1,mask=m)) + j = (/ 1, 2, 3 /); call check(33, 0, MAXLOC(j, DIM=1,mask=m)) + j = (/ 3, 2, 1 /); call check(34, 0, MAXLOC(j, DIM=1,mask=m)) + j = (/ 1, 2, 1 /); call check(35, 0, MINLOC(j, DIM=1,mask=m)) + j = (/ 1, 2, 3 /); call check(36, 0, MINLOC(j, DIM=1,mask=m)) + j = (/ 3, 2, 1 /); call check(37, 0, MINLOC(j, DIM=1,mask=m)) + + j = (/ 1, 2, 1 /); call check(38, 2, MAXLOC(j, DIM=1,mask=m2)) + j = (/ 1, 2, 3 /); call check(39, 2, MAXLOC(j, DIM=1,mask=m2)) + j = (/ 3, 2, 1 /); call check(40, 2, MAXLOC(j, DIM=1,mask=m2)) + j = (/ 1, 2, 1 /); call check(41, 2, MINLOC(j, DIM=1,mask=m2)) + j = (/ 1, 2, 3 /); call check(42, 2, MINLOC(j, DIM=1,mask=m2)) + j = (/ 3, 2, 1 /); call check(43, 2, MINLOC(j, DIM=1,mask=m2)) + +! Check the library minloc and maxloc + res = MAXLOC((/ 42, 23, 11 /), MASK=.FALSE.); call check(44, 0, res(1)) + res = MAXLOC((/ 42, 23, 11 /), MASK=m); call check(45, 0, res(1)) + res = MAXLOC((/ 42, 23, 11 /), MASK=m2); call check(46, 2, res(1)) + res = MAXLOC(i(1:0), MASK=.TRUE.); call check(47, 0, res(1)) + res = MAXLOC(i(1:0), MASK=.FALSE.); call check(48, 0, res(1)) + res = MAXLOC(i(1:0), MASK=m(1:0)); call check(49, 0, res(1)) + res = MAXLOC(i(1:0)); call check(50, 0, res(1)) + res = MINLOC((/ 42, 23, 11 /), MASK=.FALSE.); call check(51, 0, res(1)) + res = MINLOC((/ 42, 23, 11 /), MASK=m); call check(52, 0, res(1)) + res = MINLOC(i(1:0), MASK=.FALSE.); call check(53, 0, res(1)) + res = MINLOC(i(1:0), MASK=m(1:0)); call check(54,0, res(1)) + res = MINLOC(i(1:0), MASK=.TRUE.); call check(55,0, res(1)) + res = MINLOC(i(1:0)); call check(56,0, res(1)) + + j = (/ 1, 2, 1 /); res = MAXLOC(j); call check(57, 2, res(1)) + j = (/ 1, 2, 3 /); res = MAXLOC(j); call check(58, 3, res(1)) + j = (/ 3, 2, 1 /); res = MAXLOC(j); call check(59, 1, res(1)) + j = (/ 1, 2, 1 /); res = MINLOC(j); call check(60, 1, res(1)) + j = (/ 1, 2, 3 /); res = MINLOC(j); call check(61, 1, res(1)) + j = (/ 3, 2, 1 /); res = MINLOC(j); call check(62, 3, res(1)) + + j = (/ 1, 2, 1 /); res = MAXLOC(j,mask=.true.); call check(63, 2, res(1)) + j = (/ 1, 2, 3 /); res = MAXLOC(j,mask=.true.); call check(65, 3, res(1)) + j = (/ 3, 2, 1 /); res = MAXLOC(j,mask=.true.); call check(66, 1, res(1)) + j = (/ 1, 2, 1 /); res = MINLOC(j,mask=.true.); call check(67, 1, res(1)) + j = (/ 1, 2, 3 /); res = MINLOC(j,mask=.true.); call check(68, 1, res(1)) + j = (/ 3, 2, 1 /); res = MINLOC(j,mask=.true.); call check(69, 3, res(1)) + + j = (/ 1, 2, 1 /); res = MAXLOC(j,mask=.false.); call check(70, 0, res(1)) + j = (/ 1, 2, 3 /); res = MAXLOC(j,mask=.false.); call check(71, 0, res(1)) + j = (/ 3, 2, 1 /); res = MAXLOC(j,mask=.false.); call check(72, 0, res(1)) + j = (/ 1, 2, 1 /); res = MINLOC(j,mask=.false.); call check(73, 0, res(1)) + j = (/ 1, 2, 3 /); res = MINLOC(j,mask=.false.); call check(74, 0, res(1)) + j = (/ 3, 2, 1 /); res = MINLOC(j,mask=.false.); call check(75, 0, res(1)) + + j = (/ 1, 2, 1 /); res = MAXLOC(j,mask=m); call check(76, 0, res(1)) + j = (/ 1, 2, 3 /); res = MAXLOC(j,mask=m); call check(77, 0, res(1)) + j = (/ 3, 2, 1 /); res = MAXLOC(j,mask=m); call check(78, 0, res(1)) + j = (/ 1, 2, 1 /); res = MINLOC(j,mask=m); call check(79, 0, res(1)) + j = (/ 1, 2, 3 /); res = MINLOC(j,mask=m); call check(80, 0, res(1)) + j = (/ 3, 2, 1 /); res = MINLOC(j,mask=m);call check(81, 0, res(1)) + + j = (/ 1, 2, 1 /); res = MAXLOC(j,mask=m2); call check(82, 2, res(1)) + j = (/ 1, 2, 3 /); res = MAXLOC(j,mask=m2); call check(83, 2, res(1)) + j = (/ 3, 2, 1 /); res = MAXLOC(j,mask=m2); call check(84, 2, res(1)) + j = (/ 1, 2, 1 /); res = MINLOC(j,mask=m2); call check(85, 2, res(1)) + j = (/ 1, 2, 3 /); res = MINLOC(j,mask=m2); call check(86, 2, res(1)) + j = (/ 3, 2, 1 /); res = MINLOC(j,mask=m2); call check(87, 2, res(1)) + +contains +subroutine check(n, i,j) + integer, value, intent(in) :: i,j,n + if(i /= j) then + call abort() +! print *, 'ERROR: Test',n,' expected ',i,' received ', j + end if +end subroutine check +end program diff --git a/gcc/testsuite/gfortran.dg/minmaxloc_11.f90 b/gcc/testsuite/gfortran.dg/minmaxloc_11.f90 new file mode 100644 index 00000000000..1ab8eb11d73 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/minmaxloc_11.f90 @@ -0,0 +1,9 @@ +! { dg-do run } +program main + character(len=3), dimension(2) :: a + a(1) = 'aaa' + a(2) = 'bbb' + if (maxloc(a,dim=1) /= 2) call abort + if (minloc(a,dim=1) /= 1) call abort + +end program main diff --git a/gcc/testsuite/gfortran.dg/minmaxloc_9.f90 b/gcc/testsuite/gfortran.dg/minmaxloc_9.f90 new file mode 100644 index 00000000000..badadac625c --- /dev/null +++ b/gcc/testsuite/gfortran.dg/minmaxloc_9.f90 @@ -0,0 +1,11 @@ +! { dg-do compile } +! Check for a few restrictions on the back argument to +! minloc and maxloc. +program main + integer, dimension(3) :: a + a = [1,2,3] + print *,minloc(a,back=42) ! { dg-error "must be LOGICAL" } + print *,minloc(a,back=[.true.,.false.]) ! { dg-error "must be a scalar" } + print *,maxloc(a,back=42) ! { dg-error "must be LOGICAL" } + print *,maxloc(a,back=[.true.,.false.]) ! { dg-error "must be a scalar" } +end program main diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index c6c362870bd..55b087f22ee 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,225 @@ +2018-01-15 Thomas Koenig + + 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-14 Jerry DeLisle PR libgfortran/83811 diff --git a/libgfortran/generated/iall_i1.c b/libgfortran/generated/iall_i1.c index bf13b79104a..a171ed21053 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 a3de245b9ec..80c89e828dd 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 b2b3f05e9a5..618b02479b2 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 70a43795d8e..808e073003d 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 77cc4c09318..c487b6cacfb 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 9673cb0e2cb..0890eed633a 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 df60f10f656..126db338d33 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 5b0623bdbe9..3a26b2ced84 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 a7effd6db8a..8b81d001be1 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 c87ba7aed4d..9ffc9b6c89a 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 4315406d7ae..b4d4240291c 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 8817487bcb0..96cb108b0ee 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 0c737038846..b077f29c381 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 1f1bfa9a01c..1b5dfe0397a 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 ad58b537381..056a59bfaea 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 aa5ac367a09..25398cc7989 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 . */ #include "libgfortran.h" +#include #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 f648402d1a1..3a4a7446274 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 . */ #include "libgfortran.h" +#include #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 825eb74d80c..0ff8ca0b183 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 . */ #include "libgfortran.h" +#include #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 0720609ccd3..84cff67ea08 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 . */ #include "libgfortran.h" +#include #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 f5318e9caec..e276295027b 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 . */ #include "libgfortran.h" +#include #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 1641b3af8ce..384487fadeb 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 . */ #include "libgfortran.h" +#include #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 c5409fd8ed3..10c7673f73c 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 . */ #include "libgfortran.h" +#include #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 1d076a1688b..b7aaa3d5cef 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 . */ #include "libgfortran.h" +#include #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 2cb175b3319..2ca3479d3f9 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 . */ #include "libgfortran.h" +#include #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 424237cca72..a05d17893e3 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 e0c236a4008..f6adf95c356 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 137e852d860..dc31e1d4b65 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 . */ #include "libgfortran.h" +#include #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 880e3cac2d6..f7226001282 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 . */ #include "libgfortran.h" +#include #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 98197ecf410..f78e20ec405 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 . */ #include "libgfortran.h" +#include #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 cc6ad848ec7..58c3cf1d4b4 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 . */ #include "libgfortran.h" +#include #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 802f935ae55..ded9b5bcade 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 . */ #include "libgfortran.h" +#include #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 1222096700a..c64bd532380 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 . */ #include "libgfortran.h" +#include #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 deaca72c5a2..4fd46a3371b 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 . */ #include "libgfortran.h" +#include #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 aa7fca0a9d7..c168aee4d57 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 . */ #include "libgfortran.h" +#include #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 ba0659d7b4d..655a6527304 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 . */ #include "libgfortran.h" +#include #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 80759a661d2..b13a9b94146 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 75eeaeed5a3..971e8680804 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 dd07066f81a..b86f0cb2946 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 . */ #include "libgfortran.h" +#include #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 44ab70c3829..710d26097b6 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 . */ #include "libgfortran.h" +#include #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 6dfd0d86321..e85fb07ab4b 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 . */ #include "libgfortran.h" +#include #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 01b18c394f3..bb6d51ee69a 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 . */ #include "libgfortran.h" +#include #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 df7544f9ac6..d6c6e850ed4 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 . */ #include "libgfortran.h" +#include #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 3047b1e2390..333e57095fd 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 . */ #include "libgfortran.h" +#include #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 baf000cdbaa..ebb3118864d 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 . */ #include "libgfortran.h" +#include #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 48fa4240b4b..afc46960059 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 . */ #include "libgfortran.h" +#include #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 37a25ef3865..e6a2feffa97 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 . */ #include "libgfortran.h" +#include #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 1c86ff4974b..2e95fa35d1c 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 14f4658ba13..5cc1f11fb85 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 d1d1d5e3a96..ff2124d2803 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 . */ #include "libgfortran.h" +#include #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 27aa37d7c83..2b0bd54ba8a 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 . */ #include "libgfortran.h" +#include #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 a79088d1e9c..26c3f142b9f 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 . */ #include "libgfortran.h" +#include #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 852677de166..aedc22a1cfd 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 . */ #include "libgfortran.h" +#include #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 4cdc1a7a6cc..d08561d4aff 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 . */ #include "libgfortran.h" +#include #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 f3f9890ae46..a5929ee47e4 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 . */ #include "libgfortran.h" +#include #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 6bbef795c6e..09da74031d1 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 . */ #include "libgfortran.h" +#include #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 98019899d0a..927830008e2 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 . */ #include "libgfortran.h" +#include #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 86cffb931a2..84c0c650641 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 . */ #include "libgfortran.h" +#include #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 16be6117731..84b12f3e26c 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 +#include 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 09bbb992dce..70696f2ac3f 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 +#include 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 364d09e73fd..7fc1f88c2d9 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 . */ #include "libgfortran.h" +#include #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 e05a9ace697..14b5e5578b8 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 . */ #include "libgfortran.h" +#include #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 38879170d9b..9d5a98ed341 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 . */ #include "libgfortran.h" +#include #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 bc8a7fd31d8..23d702850f4 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 . */ #include "libgfortran.h" +#include #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 e1d2aee5277..178a20aa2ff 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 . */ #include "libgfortran.h" +#include #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 03d55cce21b..f35961338bf 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 . */ #include "libgfortran.h" +#include #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 1d86824bf78..a0f283e7cec 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 . */ #include "libgfortran.h" +#include #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 8dcae97b3ed..aeb4b8f1068 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 . */ #include "libgfortran.h" +#include #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 9c0f5b158af..43852049c9c 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 . */ #include "libgfortran.h" +#include #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 a882a7be436..b7b7d8cfe93 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 +#include 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 acc989ce1ab..da7594993d1 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 +#include 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 80877895971..fa5bc4aadfd 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 . */ #include "libgfortran.h" +#include #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 71ad13c68bd..2cf75312ece 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 . */ #include "libgfortran.h" +#include #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 d89b74f4c14..e32eafe2f05 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 . */ #include "libgfortran.h" +#include #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 df4b218e9fb..e348550787e 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 . */ #include "libgfortran.h" +#include #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 946e4ca3645..802b74d9461 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 . */ #include "libgfortran.h" +#include #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 a7db332441d..bc5f1b1af2c 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 . */ #include "libgfortran.h" +#include #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 e118f12f820..54d12030c11 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 . */ #include "libgfortran.h" +#include #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 b97cd4c3f04..5895585c403 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 . */ #include "libgfortran.h" +#include #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 69c0c298bad..8c79dd46ab0 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 . */ #include "libgfortran.h" +#include #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 e18ec1a4a61..aab24491ba9 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 +#include 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 dbe40e96286..f02e2a54526 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 +#include 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 1a4a88670c5..bfba7074bcc 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 #include +#include #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 31a6804c9d5..cf1235e92c9 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 #include +#include #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 e68f50a7a8f..e88ecca6eb4 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 #include +#include #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 104bfc6f251..adeba9321ec 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 #include +#include #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 04c257ee235..1a32e13949a 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 #include +#include #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 fe7de5057dd..ae22a51c527 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 #include +#include #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 88d80e11ad6..2c6b865d60a 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 c555085c712..060463601a7 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 159ec96615e..bcd4343ae08 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 70f8e905196..bef1c291c35 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 49517bb4f9a..14deb70de47 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 683a6f9be2e..85d6d83b24a 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 1eaae8c5d34..18ef36725a8 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 72ac583bfa0..862fe633c0c 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 de58c877d38..9315483d39e 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 c958fdc3201..88720df56f7 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 . */ #include "libgfortran.h" +#include #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 82c86b5adfe..4e2b6d0ca54 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 . */ #include "libgfortran.h" +#include #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 b32d560291d..c9032c7a970 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 . */ #include "libgfortran.h" +#include #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 977bbb6a59c..a27405a3ff6 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 . */ #include "libgfortran.h" +#include #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 a55c97e2fec..6874f66ae56 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 . */ #include "libgfortran.h" +#include #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 594e4337d46..ad97459d443 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 . */ #include "libgfortran.h" +#include #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 22bf13173fb..f8245ed3059 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 . */ #include "libgfortran.h" +#include #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 f7b8e9e6f99..ed41783dd5e 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 . */ #include "libgfortran.h" +#include #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 3be2ea9b7b0..0799d4dfca8 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 . */ #include "libgfortran.h" +#include #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 524d27d1be2..e566d749fb7 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 736eaa35d2c..2a0b13c240f 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 acfbb918777..577c9ddf655 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 . */ #include "libgfortran.h" +#include #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 a47b20ecea0..48da69e3982 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 . */ #include "libgfortran.h" +#include #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 8b378bab786..815ea85c221 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 . */ #include "libgfortran.h" +#include #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 b91d2bf8e22..36b0a58f250 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 . */ #include "libgfortran.h" +#include #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 ee87eaa872f..a66280cd074 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 . */ #include "libgfortran.h" +#include #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 9d39606b7b8..461ad0d477b 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 . */ #include "libgfortran.h" +#include #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 be920c3243f..27e6d1d6a42 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 . */ #include "libgfortran.h" +#include #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 f5beb64171b..1b85544a292 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 . */ #include "libgfortran.h" +#include #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 2f6973ce8fd..7c6d6bfbec2 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 . */ #include "libgfortran.h" +#include #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 111ee09c86f..4d58df41b4f 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 d5379df00e3..bea56c06b3d 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 cf7f5c1af71..b0bccc89b99 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 . */ #include "libgfortran.h" +#include #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 d703408f377..b4fb041b4a6 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 . */ #include "libgfortran.h" +#include #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 003c33b32c2..13b39040f05 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 . */ #include "libgfortran.h" +#include #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 4b2f245a8a4..5d4dc06353e 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 . */ #include "libgfortran.h" +#include #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 6f2dc2ece3a..d4cf9a4a977 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 . */ #include "libgfortran.h" +#include #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 1f08628eb06..c74fe0f6e8b 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 . */ #include "libgfortran.h" +#include #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 e32fd136d02..0ce3fd7b803 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 . */ #include "libgfortran.h" +#include #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 533e7484aec..66c5b74e40a 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 . */ #include "libgfortran.h" +#include #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 1eb7423a676..bd6b217f7f9 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 . */ #include "libgfortran.h" +#include #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 d7b6bee7784..dd9be96f3dc 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 ca1910c169e..46d29ec0b88 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 e03ea37cd69..20197c4ae0d 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 . */ #include "libgfortran.h" +#include #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 0ef0bdadd64..fc718a894c6 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 . */ #include "libgfortran.h" +#include #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 df854ce9a3f..e9352b1d730 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 . */ #include "libgfortran.h" +#include #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 8c02e7a2a86..9faa5b3947c 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 . */ #include "libgfortran.h" +#include #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 938da8d7c8b..6ad4abedf04 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 . */ #include "libgfortran.h" +#include #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 fbbcce6d4ec..930d077cdf9 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 . */ #include "libgfortran.h" +#include #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 4d3df6c81cc..2003d8ff9ac 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 . */ #include "libgfortran.h" +#include #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 ff62be42373..7b9698342cb 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 . */ #include "libgfortran.h" +#include #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 51ea636c34d..d6839157cb1 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 . */ #include "libgfortran.h" +#include #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 51d49c2ebf9..898d124fdd3 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 +#include 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 cebf6b330c0..82eb258e009 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 +#include 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 e9618771234..b36f2681fe4 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 . */ #include "libgfortran.h" +#include #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 3ea294e0a65..b4454e1aca7 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 . */ #include "libgfortran.h" +#include #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 564c26265ee..f8ab77ccded 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 . */ #include "libgfortran.h" +#include #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 97dd9c2b203..6523d01fc9e 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 . */ #include "libgfortran.h" +#include #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 4c406326743..ab1b6bae8b3 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 . */ #include "libgfortran.h" +#include #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 01903a796d1..a481ec459d3 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 . */ #include "libgfortran.h" +#include #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 f266ea7a91f..f5fcb666c59 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 . */ #include "libgfortran.h" +#include #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 3f680e57661..212aa2541cb 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 . */ #include "libgfortran.h" +#include #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 dc425ef27bf..1fa41f2e084 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 . */ #include "libgfortran.h" +#include #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 0b8c0e83862..1b7e5514cc8 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 +#include 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 c92f690fe30..b3c6010efda 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 +#include 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 913a7a698f7..66771b34523 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 . */ #include "libgfortran.h" +#include #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 218b20c74d5..8c7bc1908e2 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 . */ #include "libgfortran.h" +#include #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 191bccee5e2..e31acb53b72 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 . */ #include "libgfortran.h" +#include #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 ff617860720..4402bdd8ffe 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 . */ #include "libgfortran.h" +#include #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 42f917c6d15..172cbb5d138 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 . */ #include "libgfortran.h" +#include #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 603f57ba2ba..557e87616b6 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 . */ #include "libgfortran.h" +#include #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 cad0d001dc9..184dd1e098f 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 . */ #include "libgfortran.h" +#include #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 15d7482abe5..fd810209258 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 . */ #include "libgfortran.h" +#include #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 7cd1c9d6f59..fc0ff7c9076 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 . */ #include "libgfortran.h" +#include #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 8428db2abb1..b5b4fd50674 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 +#include 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 8042dd23026..4181630eca2 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 +#include 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 841aeeb6e5a..3685603ecc2 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 #include +#include #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 7b716422e80..256784fd8ce 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 #include +#include #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 d5b88e17fbc..1ba34d1712e 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 #include +#include #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 62137782e2d..cd5053d71ff 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 #include +#include #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 7aacd28f7db..5c73d89f8e7 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 #include +#include #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 c94bc740664..9b40c9140cb 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 #include +#include #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 f57c5abbad2..7bb6f81b0e7 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 11781a6f983..b2608bc102d 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 b7869858d37..6539ae10b60 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 ecd0b4e9d75..e2c16d2e8da 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 a4e8f78d950..9caafd97e04 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 0ac2185019c..308f64b25b3 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 bee128970d6..948aee092cf 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 d47a9c8658a..b52a3e80f4d 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 05528470e8d..34caf05fc0c 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 37b3a879cd9..b6e5a4a51d3 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 faa06ba4d00..32237dbd6d8 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 22a006b8a35..504d31306e9 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 7b2a5ae0d7d..60e707f9206 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 fe4e5c8245d..29207994250 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 b74882cc6d0..c1ac0b26f05 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 9c0b0eb0f39..c588e721a6e 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 7506605e67e..0acb039c1af 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 273c27285ed..84623dffe1b 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 d78bab99765..38e8251861e 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 7b6b1eedb5f..d1c04ec9793 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 ddb28bc5e81..d19cfaf6d89 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 e1705bc9c3c..ed1e12afba7 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 38f6f212d02..2e86e99e569 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 58c51fb6b2e..f23890ef740 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 b91ca757295..762e5486ac6 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 246dc7e129b..ecf047029d5 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 a0e264f74c8..a9530ec6907 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 decefd7509e..613ed18e9e4 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 66f3ef91d97..9befd51edc4 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 0f5f1f5d4ce..5e356ee8bfc 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 75ed99c501a..4e98cfa113b 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 9083745614c..6923594e01f 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 15c2d6b4f10..4ed50d04dd8 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 654ed6098a0..9d5516a3b4a 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 1313c5d72ae..84684cbcd2e 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 a6d3043ef6b..f4407028de5 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 d8f80b0bcda..570f8f2c441 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 49209c4d681..ea70d508886 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 39954d179cf..4915ec9feb4 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 6fb7d9b967c..53f6ec24fd4 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 dcafdec8d8e..9552ed84cc8 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 e230e6107c7..6c8320691bf 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 a2bca49e35c..1595336bf30 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 7c2836e5459..7c8a186ce76 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. */ diff --git a/libgfortran/m4/iforeach-s.m4 b/libgfortran/m4/iforeach-s.m4 index c62a1f734cb..9711925ed99 100644 --- a/libgfortran/m4/iforeach-s.m4 +++ b/libgfortran/m4/iforeach-s.m4 @@ -13,23 +13,27 @@ compare_fcn (const atype_name *a, const atype_name *b, gfc_charlen_type n) } -extern void name`'rtype_qual`_'atype_code (rtype * const restrict retarray, - atype * const restrict array, gfc_charlen_type len); -export_proto(name`'rtype_qual`_'atype_code); +extern void name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, + 'atype` * const restrict array'back_arg`, gfc_charlen_type len); +export_proto('name`'rtype_qual`_'atype_code); void -name`'rtype_qual`_'atype_code (rtype * const restrict retarray, - atype * const restrict array, gfc_charlen_type len) +name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, + 'atype` * const restrict array'back_arg`, gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; index_type sstride[GFC_MAX_DIMENSIONS]; index_type dstride; - const atype_name *base; + const 'atype_name *base; rtype_name * restrict dest; 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"); @@ -112,27 +116,32 @@ define(FINISH_FOREACH_FUNCTION, }')dnl define(START_MASKED_FOREACH_FUNCTION, ` -extern void `m'name`'rtype_qual`_'atype_code (rtype * const restrict, - atype * const restrict, gfc_array_l1 * const restrict, gfc_charlen_type len); -export_proto(`m'name`'rtype_qual`_'atype_code); +extern void `m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict, + 'atype` * const restrict, gfc_array_l1 * const restrict 'back_arg`, + gfc_charlen_type len); +export_proto(m'name`'rtype_qual`_'atype_code`); void -`m'name`'rtype_qual`_'atype_code (rtype * const restrict retarray, - atype * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) +m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, + 'atype` * const restrict array, + gfc_array_l1 * const restrict mask'back_arg`, + gfc_charlen_type len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; index_type sstride[GFC_MAX_DIMENSIONS]; index_type mstride[GFC_MAX_DIMENSIONS]; index_type dstride; - rtype_name *dest; + 'rtype_name *dest; const atype_name *base; GFC_LOGICAL_1 *mbase; int rank; 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"); @@ -243,23 +252,29 @@ $2 FINISH_MASKED_FOREACH_FUNCTION')dnl define(SCALAR_FOREACH_FUNCTION, ` -extern void `s'name`'rtype_qual`_'atype_code (rtype * const restrict, - atype * const restrict, GFC_LOGICAL_4 *, gfc_charlen_type len); -export_proto(`s'name`'rtype_qual`_'atype_code); +extern void `s'name`'rtype_qual`_'atype_code` ('rtype` * const restrict, + 'atype` * const restrict, GFC_LOGICAL_4 *'back_arg`, + gfc_charlen_type len); +export_proto(s'name`'rtype_qual`_'atype_code); void -`s'name`'rtype_qual`_'atype_code (rtype * const restrict retarray, - atype * const restrict array, - GFC_LOGICAL_4 * mask, gfc_charlen_type len) +`s'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, + 'atype` * const restrict array, + GFC_LOGICAL_4 * mask'back_arg`, + gfc_charlen_type len) { index_type rank; index_type dstride; index_type n; - rtype_name *dest; + 'rtype_name *dest; if (*mask) { +#ifdef HAVE_BACK_ARG + name`'rtype_qual`_'atype_code (retarray, array, back, len); +#else name`'rtype_qual`_'atype_code (retarray, array, len); +#endif return; } diff --git a/libgfortran/m4/iforeach.m4 b/libgfortran/m4/iforeach.m4 index 2b9e7dd73f3..e6365ccc3ef 100644 --- a/libgfortran/m4/iforeach.m4 +++ b/libgfortran/m4/iforeach.m4 @@ -5,12 +5,12 @@ dnl Distributed under the GNU GPL with exception. See COPYING for details. define(START_FOREACH_FUNCTION, ` extern void name`'rtype_qual`_'atype_code (rtype * const restrict retarray, - atype * const restrict array); + atype * const restrict array, GFC_LOGICAL_4); export_proto(name`'rtype_qual`_'atype_code); void name`'rtype_qual`_'atype_code (rtype * const restrict retarray, - atype * const restrict array) + atype * const restrict array, GFC_LOGICAL_4 back) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -21,6 +21,7 @@ name`'rtype_qual`_'atype_code (rtype * 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"); @@ -104,13 +105,14 @@ define(FINISH_FOREACH_FUNCTION, define(START_MASKED_FOREACH_FUNCTION, ` extern void `m'name`'rtype_qual`_'atype_code (rtype * const restrict, - atype * const restrict, gfc_array_l1 * const restrict); + atype * const restrict, gfc_array_l1 * const restrict, + GFC_LOGICAL_4); export_proto(`m'name`'rtype_qual`_'atype_code); void `m'name`'rtype_qual`_'atype_code (rtype * const restrict retarray, atype * 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]; @@ -124,6 +126,7 @@ void 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"); @@ -235,13 +238,13 @@ FINISH_MASKED_FOREACH_FUNCTION')dnl define(SCALAR_FOREACH_FUNCTION, ` extern void `s'name`'rtype_qual`_'atype_code (rtype * const restrict, - atype * const restrict, GFC_LOGICAL_4 *); + atype * const restrict, GFC_LOGICAL_4 *, GFC_LOGICAL_4); export_proto(`s'name`'rtype_qual`_'atype_code); void `s'name`'rtype_qual`_'atype_code (rtype * const restrict retarray, atype * const restrict array, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back) { index_type rank; index_type dstride; @@ -250,7 +253,7 @@ void if (*mask) { - name`'rtype_qual`_'atype_code (retarray, array); + name`'rtype_qual`_'atype_code (retarray, array, back); return; } diff --git a/libgfortran/m4/ifunction-s.m4 b/libgfortran/m4/ifunction-s.m4 index 0f0c28fa416..9b4d96ab622 100644 --- a/libgfortran/m4/ifunction-s.m4 +++ b/libgfortran/m4/ifunction-s.m4 @@ -19,6 +19,7 @@ dnl You should not return or break from the inner loop of the implementation. dnl Care should also be taken to avoid using the names defined in iparm.m4 define(START_ARRAY_FUNCTION, `#include +#include static inline int compare_fcn (const atype_name *a, const atype_name *b, gfc_charlen_type n) @@ -29,21 +30,22 @@ compare_fcn (const atype_name *a, const atype_name *b, gfc_charlen_type n) return memcmp_char4 (a, b, n); } -extern void name`'rtype_qual`_'atype_code (rtype * const restrict, - atype * const restrict, const index_type * const restrict, +extern void name`'rtype_qual`_'atype_code (rtype` * const restrict, + 'atype` * const restrict, const index_type * const restrict 'back_arg`, gfc_charlen_type); -export_proto(name`'rtype_qual`_'atype_code); +export_proto('name`'rtype_qual`_'atype_code`); void -name`'rtype_qual`_'atype_code (rtype * const restrict retarray, - atype * const restrict array, - const index_type * const restrict pdim, gfc_charlen_type string_len) +'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, + 'atype` * const restrict array, + const index_type * const restrict pdim'back_arg`, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; index_type sstride[GFC_MAX_DIMENSIONS]; index_type dstride[GFC_MAX_DIMENSIONS]; - const atype_name * restrict base; + const 'atype_name * restrict base; rtype_name * restrict dest; index_type rank; index_type n; @@ -52,6 +54,10 @@ name`'rtype_qual`_'atype_code (rtype * 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; @@ -192,23 +198,24 @@ define(FINISH_ARRAY_FUNCTION, }')dnl define(START_MASKED_ARRAY_FUNCTION, ` -extern void `m'name`'rtype_qual`_'atype_code (rtype * const restrict, - atype * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict, gfc_charlen_type); -export_proto(`m'name`'rtype_qual`_'atype_code); +extern void `m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict, + 'atype` * const restrict, const index_type * const restrict, + gfc_array_l1 * const restrict'back_arg`, gfc_charlen_type); +export_proto(m'name`'rtype_qual`_'atype_code`); void -`m'name`'rtype_qual`_'atype_code (rtype * const restrict retarray, - atype * const restrict array, +m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, + 'atype` * 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'back_arg`, + gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; index_type sstride[GFC_MAX_DIMENSIONS]; index_type dstride[GFC_MAX_DIMENSIONS]; index_type mstride[GFC_MAX_DIMENSIONS]; - rtype_name * restrict dest; + 'rtype_name * restrict dest; const atype_name * restrict base; const GFC_LOGICAL_1 * restrict mbase; index_type rank; @@ -219,6 +226,9 @@ void index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -377,21 +387,21 @@ define(FINISH_MASKED_ARRAY_FUNCTION, }')dnl define(SCALAR_ARRAY_FUNCTION, ` -extern void `s'name`'rtype_qual`_'atype_code (rtype * const restrict, - atype * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *, gfc_charlen_type); -export_proto(`s'name`'rtype_qual`_'atype_code); +extern void `s'name`'rtype_qual`_'atype_code` ('rtype` * const restrict, + 'atype` * const restrict, const index_type * const restrict, + GFC_LOGICAL_4 *'back_arg`, gfc_charlen_type); +export_proto(s'name`'rtype_qual`_'atype_code`); void -`s'name`'rtype_qual`_'atype_code (rtype * const restrict retarray, - atype * const restrict array, +s'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, + 'atype` * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask, gfc_charlen_type string_len) + GFC_LOGICAL_4 * mask 'back_arg`, gfc_charlen_type string_len) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; index_type dstride[GFC_MAX_DIMENSIONS]; - rtype_name * restrict dest; + 'rtype_name * restrict dest; index_type rank; index_type n; index_type dim; @@ -399,7 +409,11 @@ void if (*mask) { +#ifdef HAVE_BACK_ARG + name`'rtype_qual`_'atype_code (retarray, array, pdim, back, string_len); +#else name`'rtype_qual`_'atype_code (retarray, array, pdim, string_len); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/m4/ifunction.m4 b/libgfortran/m4/ifunction.m4 index fa10a8b84cb..8df072da033 100644 --- a/libgfortran/m4/ifunction.m4 +++ b/libgfortran/m4/ifunction.m4 @@ -20,19 +20,19 @@ dnl Care should also be taken to avoid using the names defined in iparm.m4 define(START_ARRAY_FUNCTION, ` extern void name`'rtype_qual`_'atype_code (rtype * const restrict, - atype * const restrict, const index_type * const restrict); -export_proto(name`'rtype_qual`_'atype_code); + atype` * const restrict, const 'index_type` * const restrict'back_arg`); +export_proto('name`'rtype_qual`_'atype_code); void -name`'rtype_qual`_'atype_code (rtype * const restrict retarray, - atype * const restrict array, - const index_type * const restrict pdim) +name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, + 'atype` * const restrict array, + const index_type * const restrict pdim'back_arg`) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; index_type sstride[GFC_MAX_DIMENSIONS]; index_type dstride[GFC_MAX_DIMENSIONS]; - const atype_name * restrict base; + const 'atype_name * restrict base; rtype_name * restrict dest; index_type rank; index_type n; @@ -41,6 +41,10 @@ name`'rtype_qual`_'atype_code (rtype * 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; @@ -181,23 +185,23 @@ define(FINISH_ARRAY_FUNCTION, }')dnl define(START_MASKED_ARRAY_FUNCTION, ` -extern void `m'name`'rtype_qual`_'atype_code (rtype * const restrict, - atype * const restrict, const index_type * const restrict, - gfc_array_l1 * const restrict); -export_proto(`m'name`'rtype_qual`_'atype_code); +extern void `m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict, + 'atype` * const restrict, const 'index_type` * const restrict, + gfc_array_l1 * const restrict'back_arg`); +export_proto(m'name`'rtype_qual`_'atype_code`); void -`m'name`'rtype_qual`_'atype_code (rtype * const restrict retarray, - atype * const restrict array, +m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, + 'atype` * const restrict array, const index_type * const restrict pdim, - gfc_array_l1 * const restrict mask) + gfc_array_l1 * const restrict mask'back_arg`) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; index_type sstride[GFC_MAX_DIMENSIONS]; index_type dstride[GFC_MAX_DIMENSIONS]; index_type mstride[GFC_MAX_DIMENSIONS]; - rtype_name * restrict dest; + 'rtype_name * restrict dest; const atype_name * restrict base; const GFC_LOGICAL_1 * restrict mbase; index_type rank; @@ -208,6 +212,9 @@ void index_type mdelta; int mask_kind; +#ifdef HAVE_BACK_ARG + assert (back == 0); +#endif dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; @@ -366,21 +373,21 @@ define(FINISH_MASKED_ARRAY_FUNCTION, }')dnl define(SCALAR_ARRAY_FUNCTION, ` -extern void `s'name`'rtype_qual`_'atype_code (rtype * const restrict, - atype * const restrict, const index_type * const restrict, - GFC_LOGICAL_4 *); -export_proto(`s'name`'rtype_qual`_'atype_code); +extern void `s'name`'rtype_qual`_'atype_code` ('rtype` * const restrict, + 'atype` * const restrict, const index_type * const restrict, + GFC_LOGICAL_4 *'back_arg`); +export_proto(s'name`'rtype_qual`_'atype_code); void -`s'name`'rtype_qual`_'atype_code (rtype * const restrict retarray, - atype * const restrict array, +`s'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, + 'atype` * const restrict array, const index_type * const restrict pdim, - GFC_LOGICAL_4 * mask) + GFC_LOGICAL_4 * mask'back_arg`) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; index_type dstride[GFC_MAX_DIMENSIONS]; - rtype_name * restrict dest; + 'rtype_name * restrict dest; index_type rank; index_type n; index_type dim; @@ -388,7 +395,11 @@ void if (*mask) { +#ifdef HAVE_BACK_ARG + name`'rtype_qual`_'atype_code (retarray, array, pdim, back); +#else name`'rtype_qual`_'atype_code (retarray, array, pdim); +#endif return; } /* Make dim zero based to avoid confusion. */ diff --git a/libgfortran/m4/iparm.m4 b/libgfortran/m4/iparm.m4 index a5596c98a16..23f05ce4434 100644 --- a/libgfortran/m4/iparm.m4 +++ b/libgfortran/m4/iparm.m4 @@ -36,3 +36,5 @@ define(`upcase', `translit(`$*', `a-z', `A-Z')')dnl define(`u_name',`regexp(upcase(name),`\([A-Z]*\)',`\1')')dnl define(rtype_ccode,ifelse(rtype_letter,`i',rtype_kind,rtype_code))dnl define(initval,ifelse(index(name,`maxval'),0,0,index(name,`minval'),0,255))dnl +define(back_arg,ifelse(index(name,`maxloc'),0,``, GFC_LOGICAL_4 back'',dnl +index(name,`minloc'),0,``, GFC_LOGICAL_4 back''))dnl diff --git a/libgfortran/m4/maxloc0.m4 b/libgfortran/m4/maxloc0.m4 index 05e50e92052..98d898f86a7 100644 --- a/libgfortran/m4/maxloc0.m4 +++ b/libgfortran/m4/maxloc0.m4 @@ -23,7 +23,8 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ -#include "libgfortran.h"' +#include "libgfortran.h" +#include ' include(iparm.m4)dnl include(iforeach.m4)dnl diff --git a/libgfortran/m4/maxloc0s.m4 b/libgfortran/m4/maxloc0s.m4 index 95bba3c8593..3c30a666feb 100644 --- a/libgfortran/m4/maxloc0s.m4 +++ b/libgfortran/m4/maxloc0s.m4 @@ -34,6 +34,8 @@ include(iforeach-s.m4)dnl `#if defined (HAVE_'atype_name`) && defined (HAVE_'rtype_name`)' +#define HAVE_BACK_ARG 1 + FOREACH_FUNCTION( ` const atype_name *maxval; maxval = base;' diff --git a/libgfortran/m4/maxloc1.m4 b/libgfortran/m4/maxloc1.m4 index 37e07726b03..324a699c0bb 100644 --- a/libgfortran/m4/maxloc1.m4 +++ b/libgfortran/m4/maxloc1.m4 @@ -23,13 +23,16 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ -#include "libgfortran.h"' +#include "libgfortran.h" +#include ' include(iparm.m4)dnl include(ifunction.m4)dnl `#if defined (HAVE_'atype_name`) && defined (HAVE_'rtype_name`)' +#define HAVE_BACK_ARG 1 + ARRAY_FUNCTION(0, ` atype_name maxval; #if defined ('atype_inf`) diff --git a/libgfortran/m4/maxloc1s.m4 b/libgfortran/m4/maxloc1s.m4 index 31b544476c5..23da4abf068 100644 --- a/libgfortran/m4/maxloc1s.m4 +++ b/libgfortran/m4/maxloc1s.m4 @@ -30,6 +30,8 @@ include(ifunction-s.m4)dnl `#if defined (HAVE_'atype_name`) && defined (HAVE_'rtype_name`)' +#define HAVE_BACK_ARG 1 + ARRAY_FUNCTION(0, ` const atype_name *maxval; maxval = base; diff --git a/libgfortran/m4/maxloc2s.m4 b/libgfortran/m4/maxloc2s.m4 index 4af5eeb9a13..5138f696ec3 100644 --- a/libgfortran/m4/maxloc2s.m4 +++ b/libgfortran/m4/maxloc2s.m4 @@ -25,7 +25,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include -#include ' +#include +#include ' include(iparm.m4)dnl `#if defined (HAVE_'atype_name`) && defined (HAVE_'rtype_name`) @@ -39,12 +40,12 @@ compare_fcn (const 'atype_name` *a, const 'atype_name` *b, gfc_charlen_type n) return memcmp_char4 (a, b, n); } -extern 'rtype_name` 'name`'rtype_qual`_'atype_code` ('atype` * const restrict, +extern 'rtype_name` 'name`'rtype_qual`_'atype_code` ('atype` * const restrict'back_arg`, gfc_charlen_type); export_proto('name`'rtype_qual`_'atype_code`); 'rtype_name` -'name`'rtype_qual`_'atype_code` ('atype` * const restrict array, gfc_charlen_type len) +'name`'rtype_qual`_'atype_code` ('atype` * const restrict array'back_arg`, gfc_charlen_type len) { index_type ret; index_type sstride; @@ -53,6 +54,7 @@ export_proto('name`'rtype_qual`_'atype_code`); const 'atype_name` *maxval; index_type i; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -75,12 +77,13 @@ export_proto('name`'rtype_qual`_'atype_code`); } extern 'rtype_name` m'name`'rtype_qual`_'atype_code` ('atype` * const restrict, - gfc_array_l1 *const restrict mask, gfc_charlen_type); + gfc_array_l1 *const restrict mask'back_arg`, + gfc_charlen_type); export_proto(m'name`'rtype_qual`_'atype_code`); 'rtype_name` m'name`'rtype_qual`_'atype_code` ('atype` * const restrict array, - gfc_array_l1 * const restrict mask, + gfc_array_l1 * const restrict mask'back_arg`, gfc_charlen_type len) { index_type ret; @@ -93,6 +96,7 @@ m'name`'rtype_qual`_'atype_code` ('atype` * const restrict array, int mask_kind; index_type mstride; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -142,15 +146,15 @@ m'name`'rtype_qual`_'atype_code` ('atype` * const restrict array, } extern 'rtype_name` s'name`'rtype_qual`_'atype_code` ('atype` * const restrict, - GFC_LOGICAL_4 *mask, gfc_charlen_type); + GFC_LOGICAL_4 *mask'back_arg`, gfc_charlen_type); export_proto(s'name`'rtype_qual`_'atype_code`); 'rtype_name` s'name`'rtype_qual`_'atype_code` ('atype` * const restrict array, - GFC_LOGICAL_4 *mask, gfc_charlen_type len) + GFC_LOGICAL_4 *mask'back_arg`, gfc_charlen_type len) { if (mask) - return 'name`'rtype_qual`_'atype_code` (array, len); + return 'name`'rtype_qual`_'atype_code` (array, len, back); else return 0; } diff --git a/libgfortran/m4/minloc0.m4 b/libgfortran/m4/minloc0.m4 index e40821ed19d..78c60d979ee 100644 --- a/libgfortran/m4/minloc0.m4 +++ b/libgfortran/m4/minloc0.m4 @@ -23,7 +23,8 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ -#include "libgfortran.h"' +#include "libgfortran.h" +#include ' include(iparm.m4)dnl include(iforeach.m4)dnl diff --git a/libgfortran/m4/minloc0s.m4 b/libgfortran/m4/minloc0s.m4 index 3b3fcf5cb7c..c4b9f461ac8 100644 --- a/libgfortran/m4/minloc0s.m4 +++ b/libgfortran/m4/minloc0s.m4 @@ -34,6 +34,8 @@ include(iforeach-s.m4)dnl `#if defined (HAVE_'atype_name`) && defined (HAVE_'rtype_name`)' +#define HAVE_BACK_ARG 1 + FOREACH_FUNCTION( ` const atype_name *minval; minval = base;' diff --git a/libgfortran/m4/minloc1.m4 b/libgfortran/m4/minloc1.m4 index fafa1a9a035..ebf52f09d5f 100644 --- a/libgfortran/m4/minloc1.m4 +++ b/libgfortran/m4/minloc1.m4 @@ -23,13 +23,16 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ -#include "libgfortran.h"' +#include "libgfortran.h" +#include ' include(iparm.m4)dnl include(ifunction.m4)dnl `#if defined (HAVE_'atype_name`) && defined (HAVE_'rtype_name`)' +#define HAVE_BACK_ARG 1 + ARRAY_FUNCTION(0, ` atype_name minval; #if defined ('atype_inf`) diff --git a/libgfortran/m4/minloc1s.m4 b/libgfortran/m4/minloc1s.m4 index f2dc8c3e33d..6e46631ab8b 100644 --- a/libgfortran/m4/minloc1s.m4 +++ b/libgfortran/m4/minloc1s.m4 @@ -30,6 +30,8 @@ include(ifunction-s.m4)dnl `#if defined (HAVE_'atype_name`) && defined (HAVE_'rtype_name`)' +#define HAVE_BACK_ARG 1 + ARRAY_FUNCTION(0, ` const atype_name *minval; minval = base; diff --git a/libgfortran/m4/minloc2s.m4 b/libgfortran/m4/minloc2s.m4 index c4855676c32..2df71bb34b9 100644 --- a/libgfortran/m4/minloc2s.m4 +++ b/libgfortran/m4/minloc2s.m4 @@ -25,7 +25,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include -#include ' +#include +#include ' include(iparm.m4)dnl `#if defined (HAVE_'atype_name`) && defined (HAVE_'rtype_name`) @@ -39,11 +40,13 @@ compare_fcn (const 'atype_name` *a, const 'atype_name` *b, gfc_charlen_type n) return memcmp_char4 (a, b, n); } -extern 'rtype_name` 'name`'rtype_qual`_'atype_code` ('atype` * const restrict, gfc_charlen_type); +extern 'rtype_name` 'name`'rtype_qual`_'atype_code` ('atype` * const restrict'back_arg`, + gfc_charlen_type); export_proto('name`'rtype_qual`_'atype_code`); 'rtype_name` -'name`'rtype_qual`_'atype_code` ('atype` * const restrict array, gfc_charlen_type len) +'name`'rtype_qual`_'atype_code` ('atype` * const restrict array'back_arg`, + gfc_charlen_type len) { index_type ret; index_type sstride; @@ -52,6 +55,7 @@ export_proto('name`'rtype_qual`_'atype_code`); const 'atype_name` *maxval; index_type i; + assert(back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -74,12 +78,14 @@ export_proto('name`'rtype_qual`_'atype_code`); } extern 'rtype_name` m'name`'rtype_qual`_'atype_code` ('atype` * const restrict, - gfc_array_l1 *const restrict mask, gfc_charlen_type); + gfc_array_l1 *const restrict mask'back_arg`, + gfc_charlen_type); export_proto(m'name`'rtype_qual`_'atype_code`); 'rtype_name` m'name`'rtype_qual`_'atype_code` ('atype` * const restrict array, - gfc_array_l1 * const restrict mask, gfc_charlen_type len) + gfc_array_l1 * const restrict mask'back_arg`, + gfc_charlen_type len) { index_type ret; index_type sstride; @@ -91,6 +97,7 @@ m'name`'rtype_qual`_'atype_code` ('atype` * const restrict array, int mask_kind; index_type mstride; + assert (back == 0); extent = GFC_DESCRIPTOR_EXTENT(array,0); if (extent <= 0) return 0; @@ -140,15 +147,15 @@ m'name`'rtype_qual`_'atype_code` ('atype` * const restrict array, } extern 'rtype_name` s'name`'rtype_qual`_'atype_code` ('atype` * const restrict, - GFC_LOGICAL_4 *mask, gfc_charlen_type); + GFC_LOGICAL_4 *mask'back_arg`, gfc_charlen_type); export_proto(s'name`'rtype_qual`_'atype_code`); 'rtype_name` s'name`'rtype_qual`_'atype_code` ('atype` * const restrict array, - GFC_LOGICAL_4 *mask, gfc_charlen_type len) + GFC_LOGICAL_4 *mask'back_arg`, gfc_charlen_type len) { if (mask) - return 'name`'rtype_qual`_'atype_code` (array, len); + return 'name`'rtype_qual`_'atype_code` (array, len, back); else return 0; }