+2018-12-31 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/82995
+ * trans-expr.c (gfc_conv_procedure_call): Pass NULL pointer
+ for missing optional dummy arguments for library routines.
+ * trans-intinsic.c (conv_mask_condition): New function.
+ (gfc_conv_intrinsic_arith): Detect and handle optional mask.
+ (gfc_conv_intrinsic_minmaxloc): Likewise.
+ (gfc_conv_intrinsic_findloc): Likewise.
+ (gfc_conv_intrinsic_minmaxval): Likewise.
+ (gfc_inline_intrinsic_function_p): Do not inline for rank > 1 if
+ an optional mask is present.
+
2018-12-29 Steven G. Kargl <kargl@gcc.gnu.org>
* expr.c (external_spec_function): Add ieee_support_subnormal to list
array-descriptor actual to array-descriptor dummy, see
PR 41911 for why a check has to be inserted.
fsym == NULL is checked as intrinsics required the descriptor
- but do not always set fsym. */
+ but do not always set fsym.
+ Also, it is necessary to pass a NULL pointer to library routines
+ which usually ignore optional arguments, so they can handle
+ these themselves. */
if (e->expr_type == EXPR_VARIABLE
&& e->symtree->n.sym->attr.optional
- && ((e->rank != 0 && elemental_proc)
- || e->representation.length || e->ts.type == BT_CHARACTER
- || (e->rank != 0
- && (fsym == NULL
- || (fsym-> as
- && (fsym->as->type == AS_ASSUMED_SHAPE
- || fsym->as->type == AS_ASSUMED_RANK
- || fsym->as->type == AS_DEFERRED))))))
+ && (((e->rank != 0 && elemental_proc)
+ || e->representation.length || e->ts.type == BT_CHARACTER
+ || (e->rank != 0
+ && (fsym == NULL
+ || (fsym->as
+ && (fsym->as->type == AS_ASSUMED_SHAPE
+ || fsym->as->type == AS_ASSUMED_RANK
+ || fsym->as->type == AS_DEFERRED)))))
+ || se->ignore_optional))
gfc_conv_missing_dummy (&parmse, e, fsym ? fsym->ts : e->ts,
e->representation.length);
}
return se->ss->loop;
}
+/* Build the condition for a mask, which may be optional. */
+
+static tree
+conv_mask_condition (gfc_se *maskse, gfc_expr *maskexpr,
+ bool optional_mask)
+{
+ tree present;
+ tree type;
+
+ if (optional_mask)
+ {
+ type = TREE_TYPE (maskse->expr);
+ present = gfc_conv_expr_present (maskexpr->symtree->n.sym);
+ present = convert (type, present);
+ present = fold_build1_loc (input_location, TRUTH_NOT_EXPR, type,
+ present);
+ return fold_build2_loc (input_location, TRUTH_ORIF_EXPR,
+ type, present, maskse->expr);
+ }
+ else
+ return maskse->expr;
+}
/* Inline implementation of the sum and product intrinsics. */
static void
gfc_se *parent_se;
gfc_expr *arrayexpr;
gfc_expr *maskexpr;
+ bool optional_mask;
if (expr->rank > 0)
{
arrayexpr = arg_array->expr;
if (op == NE_EXPR || norm2)
- /* PARITY and NORM2. */
- maskexpr = NULL;
+ {
+ /* PARITY and NORM2. */
+ maskexpr = NULL;
+ optional_mask = false;
+ }
else
{
arg_mask = arg_array->next->next;
gcc_assert (arg_mask != NULL);
maskexpr = arg_mask->expr;
+ optional_mask = maskexpr && maskexpr->expr_type == EXPR_VARIABLE
+ && maskexpr->symtree->n.sym->attr.dummy
+ && maskexpr->symtree->n.sym->attr.optional;
}
if (expr->rank == 0)
/* Initialize the scalarizer. */
gfc_init_loopinfo (&loop);
- gfc_add_ss_to_loop (&loop, arrayss);
+
+ /* We add the mask first because the number of iterations is
+ taken from the last ss, and this breaks if an absent
+ optional argument is used for mask. */
+
if (maskexpr && maskexpr->rank > 0)
gfc_add_ss_to_loop (&loop, maskss);
+ gfc_add_ss_to_loop (&loop, arrayss);
/* Initialize the loop. */
gfc_conv_ss_startstride (&loop);
gfc_conv_loop_setup (&loop, &expr->where);
- gfc_mark_ss_chain_used (arrayss, 1);
if (maskexpr && maskexpr->rank > 0)
gfc_mark_ss_chain_used (maskss, 1);
+ gfc_mark_ss_chain_used (arrayss, 1);
ploop = &loop;
}
if (maskexpr && maskexpr->rank > 0)
{
- /* We enclose the above in if (mask) {...} . */
-
+ /* We enclose the above in if (mask) {...} . If the mask is an
+ optional argument, generate
+ IF (.NOT. PRESENT(MASK) .OR. MASK(I)). */
+ tree ifmask;
tmp = gfc_finish_block (&block);
- tmp = build3_v (COND_EXPR, maskse.expr, tmp,
+ ifmask = conv_mask_condition (&maskse, maskexpr, optional_mask);
+ tmp = build3_v (COND_EXPR, ifmask, tmp,
build_empty_stmt (input_location));
}
else
}
else
{
+ tree ifmask;
+
gcc_assert (expr->rank == 0);
gfc_init_se (&maskse, NULL);
gfc_conv_expr_val (&maskse, maskexpr);
- tmp = build3_v (COND_EXPR, maskse.expr, tmp,
+ ifmask = conv_mask_condition (&maskse, maskexpr, optional_mask);
+ tmp = build3_v (COND_EXPR, ifmask, tmp,
build_empty_stmt (input_location));
}
gfc_se backse;
tree pos;
int n;
+ bool optional_mask;
actual = expr->value.function.actual;
actual = actual->next->next;
gcc_assert (actual);
maskexpr = actual->expr;
+ optional_mask = maskexpr && maskexpr->expr_type == EXPR_VARIABLE
+ && maskexpr->symtree->n.sym->attr.dummy
+ && maskexpr->symtree->n.sym->attr.optional;
backexpr = actual->next->next->expr;
nonempty = NULL;
if (maskexpr && maskexpr->rank != 0)
/* Initialize the scalarizer. */
gfc_init_loopinfo (&loop);
- gfc_add_ss_to_loop (&loop, arrayss);
+
+ /* We add the mask first because the number of iterations is taken
+ from the last ss, and this breaks if an absent optional argument
+ is used for mask. */
+
if (maskss)
gfc_add_ss_to_loop (&loop, maskss);
+ gfc_add_ss_to_loop (&loop, arrayss);
+
/* Initialize the loop. */
gfc_conv_ss_startstride (&loop);
if (maskss)
{
- /* We enclose the above in if (mask) {...}. */
- tmp = gfc_finish_block (&block);
+ /* We enclose the above in if (mask) {...}. If the mask is an
+ optional argument, generate IF (.NOT. PRESENT(MASK)
+ .OR. MASK(I)). */
- tmp = build3_v (COND_EXPR, maskse.expr, tmp,
+ tree ifmask;
+ ifmask = conv_mask_condition (&maskse, maskexpr, optional_mask);
+ tmp = gfc_finish_block (&block);
+ tmp = build3_v (COND_EXPR, ifmask, tmp,
build_empty_stmt (input_location));
}
else
if (maskss)
{
- /* We enclose the above in if (mask) {...}. */
- tmp = gfc_finish_block (&block);
+ /* We enclose the above in if (mask) {...}. If the mask is
+ an optional argument, generate IF (.NOT. PRESENT(MASK)
+ .OR. MASK(I)).*/
- tmp = build3_v (COND_EXPR, maskse.expr, tmp,
+ tree ifmask;
+ ifmask = conv_mask_condition (&maskse, maskexpr, optional_mask);
+ tmp = gfc_finish_block (&block);
+ tmp = build3_v (COND_EXPR, ifmask, tmp,
build_empty_stmt (input_location));
}
else
/* For a scalar mask, enclose the loop in an if statement. */
if (maskexpr && maskss == NULL)
{
+ tree ifmask;
+
gfc_init_se (&maskse, NULL);
gfc_conv_expr_val (&maskse, maskexpr);
gfc_init_block (&block);
gfc_init_block (&elseblock);
gfc_add_modify (&elseblock, pos, gfc_index_zero_node);
elsetmp = gfc_finish_block (&elseblock);
-
- tmp = build3_v (COND_EXPR, maskse.expr, tmp, elsetmp);
+ ifmask = conv_mask_condition (&maskse, maskexpr, optional_mask);
+ tmp = build3_v (COND_EXPR, ifmask, tmp, elsetmp);
gfc_add_expr_to_block (&block, tmp);
gfc_add_block_to_block (&se->pre, &block);
}
gfc_expr *maskexpr;
tree offset;
int i;
+ bool optional_mask;
array_arg = expr->value.function.actual;
value_arg = array_arg->next;
offset = gfc_create_var (gfc_array_index_type, "offset");
maskexpr = mask_arg->expr;
+ optional_mask = maskexpr && maskexpr->expr_type == EXPR_VARIABLE
+ && maskexpr->symtree->n.sym->attr.dummy
+ && maskexpr->symtree->n.sym->attr.optional;
/* Generate two loops, one for BACK=.true. and one for BACK=.false. */
gfc_init_loopinfo (&loop);
exit_label = gfc_build_label_decl (NULL_TREE);
TREE_USED (exit_label) = 1;
- gfc_add_ss_to_loop (&loop, arrayss);
+
+ /* We add the mask first because the number of iterations is
+ taken from the last ss, and this breaks if an absent
+ optional argument is used for mask. */
+
if (maskss)
gfc_add_ss_to_loop (&loop, maskss);
+ gfc_add_ss_to_loop (&loop, arrayss);
/* Initialize the loop. */
gfc_conv_ss_startstride (&loop);
tmp = build3_v (COND_EXPR, tmp, found, build_empty_stmt (input_location));
if (maskss)
- tmp = build3_v (COND_EXPR, maskse.expr, tmp,
- build_empty_stmt (input_location));
+ {
+ /* We enclose the above in if (mask) {...}. If the mask is
+ an optional argument, generate IF (.NOT. PRESENT(MASK)
+ .OR. MASK(I)). */
+
+ tree ifmask;
+ ifmask = conv_mask_condition (&maskse, maskexpr, optional_mask);
+ tmp = build3_v (COND_EXPR, ifmask, tmp,
+ build_empty_stmt (input_location));
+ }
gfc_add_expr_to_block (&body, tmp);
gfc_add_block_to_block (&body, &arrayse.post);
/* For a scalar mask, enclose the loop in an if statement. */
if (maskexpr && maskss == NULL)
{
+ tree ifmask;
tree if_stmt;
+
gfc_init_se (&maskse, NULL);
gfc_conv_expr_val (&maskse, maskexpr);
gfc_init_block (&block);
gfc_add_expr_to_block (&block, maskse.expr);
- if_stmt = build3_v (COND_EXPR, maskse.expr, tmp,
+ ifmask = conv_mask_condition (&maskse, maskexpr, optional_mask);
+ if_stmt = build3_v (COND_EXPR, ifmask, tmp,
build_empty_stmt (input_location));
gfc_add_expr_to_block (&block, if_stmt);
tmp = gfc_finish_block (&block);
gfc_expr *arrayexpr;
gfc_expr *maskexpr;
int n;
+ bool optional_mask;
if (se->ss)
{
actual = actual->next->next;
gcc_assert (actual);
maskexpr = actual->expr;
+ optional_mask = maskexpr && maskexpr->expr_type == EXPR_VARIABLE
+ && maskexpr->symtree->n.sym->attr.dummy
+ && maskexpr->symtree->n.sym->attr.optional;
nonempty = NULL;
if (maskexpr && maskexpr->rank != 0)
{
/* Initialize the scalarizer. */
gfc_init_loopinfo (&loop);
- gfc_add_ss_to_loop (&loop, arrayss);
+
+ /* We add the mask first because the number of iterations is taken
+ from the last ss, and this breaks if an absent optional argument
+ is used for mask. */
+
if (maskss)
gfc_add_ss_to_loop (&loop, maskss);
+ gfc_add_ss_to_loop (&loop, arrayss);
/* Initialize the loop. */
gfc_conv_ss_startstride (&loop);
tmp = gfc_finish_block (&block);
if (maskss)
- /* We enclose the above in if (mask) {...}. */
- tmp = build3_v (COND_EXPR, maskse.expr, tmp,
- build_empty_stmt (input_location));
+ {
+ /* We enclose the above in if (mask) {...}. If the mask is an
+ optional argument, generate IF (.NOT. PRESENT(MASK)
+ .OR. MASK(I)). */
+ tree ifmask;
+ ifmask = conv_mask_condition (&maskse, maskexpr, optional_mask);
+ tmp = build3_v (COND_EXPR, ifmask, tmp,
+ build_empty_stmt (input_location));
+ }
gfc_add_expr_to_block (&body, tmp);
if (lab)
tmp = gfc_finish_block (&block);
if (maskss)
/* We enclose the above in if (mask) {...}. */
- tmp = build3_v (COND_EXPR, maskse.expr, tmp,
- build_empty_stmt (input_location));
+ {
+ tree ifmask;
+ ifmask = conv_mask_condition (&maskse, maskexpr, optional_mask);
+ tmp = build3_v (COND_EXPR, ifmask, tmp,
+ build_empty_stmt (input_location));
+ }
+
gfc_add_expr_to_block (&body, tmp);
/* Avoid initializing loopvar[0] again, it should be left where
it finished by the first loop. */
if (maskexpr && maskss == NULL)
{
tree else_stmt;
+ tree ifmask;
gfc_init_se (&maskse, NULL);
gfc_conv_expr_val (&maskse, maskexpr);
else_stmt = build2_v (MODIFY_EXPR, limit, huge_cst);
else
else_stmt = build_empty_stmt (input_location);
- tmp = build3_v (COND_EXPR, maskse.expr, tmp, else_stmt);
+
+ ifmask = conv_mask_condition (&maskse, maskexpr, optional_mask);
+ tmp = build3_v (COND_EXPR, ifmask, tmp, else_stmt);
gfc_add_expr_to_block (&block, tmp);
gfc_add_block_to_block (&se->pre, &block);
}
bool
gfc_inline_intrinsic_function_p (gfc_expr *expr)
{
- gfc_actual_arglist *args;
+ gfc_actual_arglist *args, *dim_arg, *mask_arg;
+ gfc_expr *maskexpr;
if (!expr->value.function.isym)
return false;
return false;
args = expr->value.function.actual;
+ dim_arg = args->next;
+
/* We need to be able to subset the SUM argument at compile-time. */
- if (args->next->expr && args->next->expr->expr_type != EXPR_CONSTANT)
+ if (dim_arg->expr && dim_arg->expr->expr_type != EXPR_CONSTANT)
return false;
+ /* FIXME: If MASK is optional for a more than two-dimensional
+ argument, the scalarizer gets confused if the mask is
+ absent. See PR 82995. For now, fall back to the library
+ function. */
+
+ mask_arg = dim_arg->next;
+ maskexpr = mask_arg->expr;
+
+ if (expr->rank > 0 && maskexpr && maskexpr->expr_type == EXPR_VARIABLE
+ && maskexpr->symtree->n.sym->attr.dummy
+ && maskexpr->symtree->n.sym->attr.optional)
+ return false;
+
return true;
case GFC_ISYM_TRANSPOSE:
+2018-12-31 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/82995
+ * gfortran.dg/optional_absent_4.f90: New test.
+ * gfortran.dg/optional_absent_5.f90: New test.
+
2018-12-31 Martin Liska <mliska@suse.cz>
* g++.dg/tree-prof/devirt.C: Fix scan pattern and test options.
--- /dev/null
+! { dg-do run }
+! PR 82995 - segfault passing on an optional argument;
+! this tests the inline versions.
+module y
+ implicit none
+contains
+
+ function sum_1 (input, mask)
+ logical, intent(in), optional :: mask(:)
+ integer, intent(in) :: input(:)
+ integer :: sum_1
+ sum_1 = sum (input, mask)
+ end function sum_1
+
+ function sum_2 (input, mask)
+ logical, intent(in), optional :: mask
+ integer, intent(in) :: input(:)
+ integer :: sum_2
+ sum_2 = sum(input, mask)
+ end function sum_2
+
+ function sum_3 (input, mask)
+ logical, intent(in), optional :: mask(:,:)
+ integer, intent(in) :: input(:,:)
+ integer :: sum_3
+ sum_3 = sum (input, mask)
+ end function sum_3
+
+ function minval_1 (input, mask)
+ logical, intent(in), optional :: mask(:,:)
+ real, intent(in) :: input(:,:)
+ real :: minval_1
+ minval_1 = minval (input, mask)
+ end function minval_1
+
+ function maxval_1 (input, mask)
+ logical, intent(in), optional :: mask
+ real, intent(in) :: input(:,:)
+ real :: maxval_1
+ maxval_1 = maxval (input, mask)
+ end function maxval_1
+
+ function maxloc_1 (input, mask)
+ logical, intent(in), optional :: mask(:)
+ real, intent(in) :: input(:)
+ integer :: maxloc_1
+
+ maxloc_1 = maxloc(input, dim=1, mask=mask)
+ end function maxloc_1
+
+ function findloc_1 (input, val, mask)
+ logical, intent(in), optional :: mask (:)
+ integer, intent(in) :: input(:)
+ integer, intent(in) :: val
+ integer :: findloc_1
+
+ findloc_1 = findloc(input, val, dim=1, mask=mask)
+ end function findloc_1
+
+ function findloc_2 (input, val, mask)
+ logical, intent(in), optional :: mask
+ integer, intent(in) :: input(:)
+ integer, intent(in) :: val
+ integer :: findloc_2
+
+ findloc_2 = findloc(input, val, dim=1, mask=mask)
+ end function findloc_2
+
+end module y
+
+program test_sum_1
+ use y
+ implicit none
+ integer :: input(5) = [1,2,4,8,16]
+ integer :: i2(2,3) = reshape([1,2,4,8,16,32], [2,3])
+ real :: r2(2,3) = reshape ([32.,16.,8.,4.,2.,1.], [2,3])
+ real :: r1(6) = [2.,4.,8.,32.,1.,16.]
+ integer :: res
+ real :: rres
+ res = sum_1(input)
+ if (res /= 31) stop 1
+ res = sum_2 (input)
+ if (res /= 31) stop 2
+ res = sum_3 (i2)
+ if (res /= 63) stop 3
+ rres = minval_1 (r2)
+ if (rres /= 1.0) stop 4
+ rres = maxval_1 (r2)
+ if (rres /= 32.) stop 5
+ res = maxloc_1 (r1)
+ if (res /= 4) stop 6
+ res = findloc_1 (input, 8)
+ if (res /= 4) stop 7
+ res = findloc_2 (input, 2)
+ if (res /= 2) stop 8
+end program test_sum_1
--- /dev/null
+! { dg-do run }
+! PR 82995 - segfault passing on an optional argument;
+! this tests the library versions.
+module z
+ implicit none
+contains
+ subroutine sum_1 (input, res, mask)
+ logical, intent(in), optional :: mask(:,:)
+ integer, intent(in) :: input(:,:)
+ integer, dimension(:), intent(out) :: res
+ res = sum (input, dim=1, mask=mask)
+ end subroutine sum_1
+
+ subroutine sum_2 (input, res, mask)
+ logical, intent(in), optional :: mask
+ integer, intent(in) :: input(:,:)
+ integer, dimension(:), intent(out) :: res
+ res = sum (input, dim=1, mask=mask)
+ end subroutine sum_2
+
+ subroutine maxloc_1 (input, res, mask)
+ logical, intent(in), optional :: mask(:,:)
+ integer, intent(in) :: input(:,:)
+ integer, dimension(:), intent(out) :: res
+ res = maxloc (input, dim=1, mask=mask)
+ end subroutine maxloc_1
+
+ subroutine minloc_1 (input, res, mask)
+ logical, intent(in), optional :: mask
+ integer, intent(in) :: input(:,:)
+ integer, dimension(:), intent(out) :: res
+ res = minloc (input, dim=1, mask=mask)
+ end subroutine minloc_1
+
+ subroutine maxloc_2 (input, res, mask)
+ logical, intent(in), optional :: mask(:,:)
+ integer, intent(in) :: input(:,:)
+ integer, dimension(:), intent(out) :: res
+ integer :: n
+ n = 1
+ res = maxloc (input, dim=n, mask=mask)
+ end subroutine maxloc_2
+
+ subroutine findloc_1 (input, val, res, mask)
+ logical, intent(in), optional :: mask(:,:)
+ integer, intent(in) :: input(:,:)
+ integer, dimension(:), intent(out) :: res
+ integer, intent(in) :: val
+ res = findloc(input, val)
+ end subroutine findloc_1
+
+ subroutine findloc_2 (input, val, res, mask)
+ logical, intent(in), optional :: mask
+ integer, intent(in) :: input(:,:)
+ integer, dimension(:), intent(out) :: res
+ integer, intent(in) :: val
+ res = findloc(input, val)
+ end subroutine findloc_2
+
+ subroutine findloc_3 (input, val, res, mask)
+ logical, intent(in), optional :: mask(:,:)
+ integer, intent(in) :: input(:,:)
+ integer, dimension(:), intent(out) :: res
+ integer, intent(in) :: val
+ res = findloc(input, val, dim=1)
+ end subroutine findloc_3
+
+ subroutine findloc_4 (input, val, res, mask)
+ logical, intent(in), optional :: mask(:,:)
+ integer, intent(in) :: input(:,:)
+ integer, dimension(:), intent(out) :: res
+ integer, intent(in) :: val
+ integer :: n = 1
+ res = findloc(input, val, dim=n)
+ end subroutine findloc_4
+
+ subroutine maxval_1 (input, res, mask)
+ logical, intent(in), optional :: mask
+ integer, intent(in) :: input(:,:)
+ integer, dimension(:), intent(out) :: res
+ res = maxval (input, dim=1, mask=mask)
+ end subroutine maxval_1
+
+ subroutine maxval_2 (input, res, mask)
+ logical, intent(in), optional :: mask
+ integer, intent(in) :: input(:,:)
+ integer, dimension(:), intent(out) :: res
+ integer :: n = 1
+ res = maxval (input, dim=n, mask=mask)
+ end subroutine maxval_2
+
+ subroutine minval_1 (input, res, mask)
+ logical, intent(in), optional :: mask(:,:)
+ integer, intent(in) :: input(:,:)
+ integer, dimension(:), intent(out) :: res
+ res = minval (input, dim=1, mask=mask)
+ end subroutine minval_1
+
+ subroutine minval_2 (input, res, mask)
+ logical, intent(in), optional :: mask(:,:)
+ integer, intent(in) :: input(:,:)
+ integer, dimension(:), intent(out) :: res
+ integer :: n = 1
+ res = minval (input, dim=n, mask=mask)
+ end subroutine minval_2
+
+end module z
+
+program main
+ use z
+ implicit none
+ integer :: i2(2,3) = reshape([1,2,4,8,16,32], [2,3])
+ integer, dimension(3) :: res3
+ integer, dimension(2) :: res2
+ call sum_1 (i2, res3)
+ if (any (res3 /= [3, 12, 48])) stop 1
+ res3 = -2
+ call sum_2 (i2, res3)
+ if (any (res3 /= [3, 12, 48])) stop 2
+ call maxloc_1 (i2, res3)
+ if (any (res3 /= 2)) stop 3
+ call minloc_1 (i2, res3)
+ if (any (res3 /= 1)) stop 4
+ call maxloc_2 (i2, res3)
+ if (any (res3 /= 2)) stop 5
+ call findloc_1 (i2, 4, res2)
+ if (any(res2 /= [1,2])) stop 6
+ res2 = -1234
+ call findloc_2 (i2, 4, res2)
+ if (any(res2 /= [1,2])) stop 7
+ call findloc_3 (i2, 4, res3)
+ if (any(res3 /= [0,1,0])) stop 8
+ call findloc_4 (i2, 4, res3)
+ if (any(res3 /= [0,1,0])) stop 9
+ call maxval_1 (i2, res3)
+ if (any (res3 /= [2,8,32])) stop 10
+ call minval_1 (i2, res3)
+ if (any (res3 /= [1,4,16])) stop 11
+ call maxval_2 (i2, res3)
+ if (any (res3 /= [2,8,32])) stop 12
+ call minval_2 (i2, res3)
+ if (any (res3 /= [1,4,16])) stop 13
+
+end program main
+2018-12-31 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/82995
+ * m4/ifindloc0.m4: Handle case of absend optional argument, passed
+ as a NULL pointer. Correct allocation of retarray->base_addr.
+ * m4/ifindloc1.m4: Likewise.
+ * m4/ifindloc2.m4: Handle case of absend optional argument, passed
+ as a NULL pointer.
+ * m4/iforeach-s.m4: Likewise.
+ * m4/iforeach-s2.m4: Likewise.
+ * m4/iforeach.m4: Likewise.
+ * m4/ifunction-s.m4: Likewise.
+ * m4/ifunction-s2.m4: Likewise.
+ * m4/ifunction.m4: Likewise.
+ * generated/findloc0_c16.c: Regenerated.
+ * generated/findloc0_c4.c: Regenerated.
+ * generated/findloc0_c8.c: Regenerated.
+ * generated/findloc0_i1.c: Regenerated.
+ * generated/findloc0_i16.c: Regenerated.
+ * generated/findloc0_i2.c: Regenerated.
+ * generated/findloc0_i4.c: Regenerated.
+ * generated/findloc0_i8.c: Regenerated.
+ * generated/findloc0_r16.c: Regenerated.
+ * generated/findloc0_r4.c: Regenerated.
+ * generated/findloc0_r8.c: Regenerated.
+ * generated/findloc0_s1.c: Regenerated.
+ * generated/findloc0_s4.c: Regenerated.
+ * generated/findloc1_c16.c: Regenerated.
+ * generated/findloc1_c4.c: Regenerated.
+ * generated/findloc1_c8.c: Regenerated.
+ * generated/findloc1_i1.c: Regenerated.
+ * generated/findloc1_i16.c: Regenerated.
+ * generated/findloc1_i2.c: Regenerated.
+ * generated/findloc1_i4.c: Regenerated.
+ * generated/findloc1_i8.c: Regenerated.
+ * generated/findloc1_r16.c: Regenerated.
+ * generated/findloc1_r4.c: Regenerated.
+ * generated/findloc1_r8.c: Regenerated.
+ * generated/findloc1_s1.c: Regenerated.
+ * generated/findloc1_s4.c: Regenerated.
+ * generated/findloc2_s1.c: Regenerated.
+ * generated/findloc2_s4.c: Regenerated.
+ * 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/maxval0_s1.c: Regenerated.
+ * generated/maxval0_s4.c: Regenerated.
+ * generated/maxval1_s1.c: Regenerated.
+ * generated/maxval1_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/minval0_s1.c: Regenerated.
+ * generated/minval0_s4.c: Regenerated.
+ * generated/minval1_s1.c: Regenerated.
+ * generated/minval1_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/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-12-29 Steven G. Kargl <kargl@gcc.gnu.org>
* gfortran.map: Expose subnormal functions in dynamic library.
* ieee/ieee_features.F90: Add IEEE_SUBNORMAL.
2018-12-29 Steven G. Kargl <kargl@gcc.gnu.org>
-
+
PR fortran/88342
* ieee/ieee_arithmetic.F90: Prevent exceptions in IEEE_VALUE if
-ffpe-trap=invalid or -ffpe-trap=overflow is used.
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
index_type * restrict dest;
index_type n;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc0_c16 (retarray, array, value, back);
return;
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else if (unlikely (compile_options.bounds_check))
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
index_type * restrict dest;
index_type n;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc0_c4 (retarray, array, value, back);
return;
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else if (unlikely (compile_options.bounds_check))
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
index_type * restrict dest;
index_type n;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc0_c8 (retarray, array, value, back);
return;
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else if (unlikely (compile_options.bounds_check))
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
index_type * restrict dest;
index_type n;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc0_i1 (retarray, array, value, back);
return;
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else if (unlikely (compile_options.bounds_check))
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
index_type * restrict dest;
index_type n;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc0_i16 (retarray, array, value, back);
return;
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else if (unlikely (compile_options.bounds_check))
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
index_type * restrict dest;
index_type n;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc0_i2 (retarray, array, value, back);
return;
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else if (unlikely (compile_options.bounds_check))
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
index_type * restrict dest;
index_type n;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc0_i4 (retarray, array, value, back);
return;
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else if (unlikely (compile_options.bounds_check))
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
index_type * restrict dest;
index_type n;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc0_i8 (retarray, array, value, back);
return;
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else if (unlikely (compile_options.bounds_check))
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
index_type * restrict dest;
index_type n;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc0_r16 (retarray, array, value, back);
return;
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else if (unlikely (compile_options.bounds_check))
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
index_type * restrict dest;
index_type n;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc0_r4 (retarray, array, value, back);
return;
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else if (unlikely (compile_options.bounds_check))
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
index_type * restrict dest;
index_type n;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc0_r8 (retarray, array, value, back);
return;
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else if (unlikely (compile_options.bounds_check))
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
index_type * restrict dest;
index_type n;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc0_s1 (retarray, array, value, back, len_array, len_value);
return;
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else if (unlikely (compile_options.bounds_check))
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
index_type * restrict dest;
index_type n;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc0_s4 (retarray, array, value, back, len_array, len_value);
return;
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else if (unlikely (compile_options.bounds_check))
{
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
index_type dim;
bool continue_loop;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc1_c16 (retarray, array, value, pdim, back);
return;
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
index_type dim;
bool continue_loop;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc1_c4 (retarray, array, value, pdim, back);
return;
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
index_type dim;
bool continue_loop;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc1_c8 (retarray, array, value, pdim, back);
return;
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
index_type dim;
bool continue_loop;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc1_i1 (retarray, array, value, pdim, back);
return;
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
index_type dim;
bool continue_loop;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc1_i16 (retarray, array, value, pdim, back);
return;
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
index_type dim;
bool continue_loop;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc1_i2 (retarray, array, value, pdim, back);
return;
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
index_type dim;
bool continue_loop;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc1_i4 (retarray, array, value, pdim, back);
return;
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
index_type dim;
bool continue_loop;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc1_i8 (retarray, array, value, pdim, back);
return;
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
index_type dim;
bool continue_loop;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc1_r16 (retarray, array, value, pdim, back);
return;
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
index_type dim;
bool continue_loop;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc1_r4 (retarray, array, value, pdim, back);
return;
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
index_type dim;
bool continue_loop;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc1_r8 (retarray, array, value, pdim, back);
return;
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
index_type dim;
bool continue_loop;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc1_s1 (retarray, array, value, pdim, back, len_array, len_value);
return;
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
index_type dim;
bool continue_loop;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc1_s4 (retarray, array, value, pdim, back, len_array, len_value);
return;
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
GFC_LOGICAL_4 back, gfc_charlen_type len_array,
gfc_charlen_type len_value)
{
- if (*mask)
+ if (mask == NULL || *mask)
{
return findloc2_s1 (array, value, back, len_array, len_value);
}
GFC_LOGICAL_4 back, gfc_charlen_type len_array,
gfc_charlen_type len_value)
{
- if (*mask)
+ if (mask == NULL || *mask)
{
return findloc2_s4 (array, value, back, len_array, len_value);
}
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ iall_i1 (retarray, array, pdim, back);
+#else
+ iall_i1 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
iall_i1 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ iall_i16 (retarray, array, pdim, back);
+#else
+ iall_i16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
iall_i16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ iall_i2 (retarray, array, pdim, back);
+#else
+ iall_i2 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
iall_i2 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ iall_i4 (retarray, array, pdim, back);
+#else
+ iall_i4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
iall_i4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ iall_i8 (retarray, array, pdim, back);
+#else
+ iall_i8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
iall_i8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ iany_i1 (retarray, array, pdim, back);
+#else
+ iany_i1 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
iany_i1 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ iany_i16 (retarray, array, pdim, back);
+#else
+ iany_i16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
iany_i16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ iany_i2 (retarray, array, pdim, back);
+#else
+ iany_i2 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
iany_i2 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ iany_i4 (retarray, array, pdim, back);
+#else
+ iany_i4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
iany_i4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ iany_i8 (retarray, array, pdim, back);
+#else
+ iany_i8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
iany_i8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ iparity_i1 (retarray, array, pdim, back);
+#else
+ iparity_i1 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
iparity_i1 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ iparity_i16 (retarray, array, pdim, back);
+#else
+ iparity_i16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
iparity_i16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ iparity_i2 (retarray, array, pdim, back);
+#else
+ iparity_i2 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
iparity_i2 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ iparity_i4 (retarray, array, pdim, back);
+#else
+ iparity_i4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
iparity_i4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ iparity_i8 (retarray, array, pdim, back);
+#else
+ iparity_i8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
iparity_i8 (retarray, array, pdim, back);
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_16_i1 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_16_i1 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_16_i16 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_16_i16 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_16_i2 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_16_i2 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_16_i4 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_16_i4 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_16_i8 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_16_i8 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_16_r10 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_16_r10 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_16_r16 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_16_r16 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_16_r4 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_16_r4 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_16_r8 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_16_r8 (retarray, array, back);
return;
index_type n;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc0_16_s1 (retarray, array, back, len);
+#else
+ maxloc0_16_s1 (retarray, array, len);
+#endif
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc0_16_s1 (retarray, array, back, len);
index_type n;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc0_16_s4 (retarray, array, back, len);
+#else
+ maxloc0_16_s4 (retarray, array, len);
+#endif
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc0_16_s4 (retarray, array, back, len);
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_4_i1 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_4_i1 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_4_i16 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_4_i16 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_4_i2 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_4_i2 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_4_i4 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_4_i4 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_4_i8 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_4_i8 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_4_r10 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_4_r10 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_4_r16 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_4_r16 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_4_r4 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_4_r4 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_4_r8 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_4_r8 (retarray, array, back);
return;
index_type n;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc0_4_s1 (retarray, array, back, len);
+#else
+ maxloc0_4_s1 (retarray, array, len);
+#endif
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc0_4_s1 (retarray, array, back, len);
index_type n;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc0_4_s4 (retarray, array, back, len);
+#else
+ maxloc0_4_s4 (retarray, array, len);
+#endif
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc0_4_s4 (retarray, array, back, len);
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_8_i1 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_8_i1 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_8_i16 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_8_i16 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_8_i2 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_8_i2 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_8_i4 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_8_i4 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_8_i8 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_8_i8 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_8_r10 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_8_r10 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_8_r16 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_8_r16 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_8_r4 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_8_r4 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ maxloc0_8_r8 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_8_r8 (retarray, array, back);
return;
index_type n;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc0_8_s1 (retarray, array, back, len);
+#else
+ maxloc0_8_s1 (retarray, array, len);
+#endif
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc0_8_s1 (retarray, array, back, len);
index_type n;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc0_8_s4 (retarray, array, back, len);
+#else
+ maxloc0_8_s4 (retarray, array, len);
+#endif
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc0_8_s4 (retarray, array, back, len);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_16_i1 (retarray, array, pdim, back);
+#else
+ maxloc1_16_i1 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_16_i1 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_16_i16 (retarray, array, pdim, back);
+#else
+ maxloc1_16_i16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_16_i16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_16_i2 (retarray, array, pdim, back);
+#else
+ maxloc1_16_i2 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_16_i2 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_16_i4 (retarray, array, pdim, back);
+#else
+ maxloc1_16_i4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_16_i4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_16_i8 (retarray, array, pdim, back);
+#else
+ maxloc1_16_i8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_16_i8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_16_r10 (retarray, array, pdim, back);
+#else
+ maxloc1_16_r10 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_16_r10 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_16_r16 (retarray, array, pdim, back);
+#else
+ maxloc1_16_r16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_16_r16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_16_r4 (retarray, array, pdim, back);
+#else
+ maxloc1_16_r4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_16_r4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_16_r8 (retarray, array, pdim, back);
+#else
+ maxloc1_16_r8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_16_r8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_16_s1 (retarray, array, pdim, back, string_len);
+#else
+ maxloc1_16_s1 (retarray, array, pdim, string_len);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_16_s1 (retarray, array, pdim, back, string_len);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_16_s4 (retarray, array, pdim, back, string_len);
+#else
+ maxloc1_16_s4 (retarray, array, pdim, string_len);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_16_s4 (retarray, array, pdim, back, string_len);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_4_i1 (retarray, array, pdim, back);
+#else
+ maxloc1_4_i1 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_4_i1 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_4_i16 (retarray, array, pdim, back);
+#else
+ maxloc1_4_i16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_4_i16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_4_i2 (retarray, array, pdim, back);
+#else
+ maxloc1_4_i2 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_4_i2 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_4_i4 (retarray, array, pdim, back);
+#else
+ maxloc1_4_i4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_4_i4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_4_i8 (retarray, array, pdim, back);
+#else
+ maxloc1_4_i8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_4_i8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_4_r10 (retarray, array, pdim, back);
+#else
+ maxloc1_4_r10 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_4_r10 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_4_r16 (retarray, array, pdim, back);
+#else
+ maxloc1_4_r16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_4_r16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_4_r4 (retarray, array, pdim, back);
+#else
+ maxloc1_4_r4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_4_r4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_4_r8 (retarray, array, pdim, back);
+#else
+ maxloc1_4_r8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_4_r8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_4_s1 (retarray, array, pdim, back, string_len);
+#else
+ maxloc1_4_s1 (retarray, array, pdim, string_len);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_4_s1 (retarray, array, pdim, back, string_len);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_4_s4 (retarray, array, pdim, back, string_len);
+#else
+ maxloc1_4_s4 (retarray, array, pdim, string_len);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_4_s4 (retarray, array, pdim, back, string_len);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_8_i1 (retarray, array, pdim, back);
+#else
+ maxloc1_8_i1 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_8_i1 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_8_i16 (retarray, array, pdim, back);
+#else
+ maxloc1_8_i16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_8_i16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_8_i2 (retarray, array, pdim, back);
+#else
+ maxloc1_8_i2 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_8_i2 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_8_i4 (retarray, array, pdim, back);
+#else
+ maxloc1_8_i4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_8_i4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_8_i8 (retarray, array, pdim, back);
+#else
+ maxloc1_8_i8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_8_i8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_8_r10 (retarray, array, pdim, back);
+#else
+ maxloc1_8_r10 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_8_r10 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_8_r16 (retarray, array, pdim, back);
+#else
+ maxloc1_8_r16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_8_r16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_8_r4 (retarray, array, pdim, back);
+#else
+ maxloc1_8_r4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_8_r4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_8_r8 (retarray, array, pdim, back);
+#else
+ maxloc1_8_r8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_8_r8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_8_s1 (retarray, array, pdim, back, string_len);
+#else
+ maxloc1_8_s1 (retarray, array, pdim, string_len);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_8_s1 (retarray, array, pdim, back, string_len);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxloc1_8_s4 (retarray, array, pdim, back, string_len);
+#else
+ maxloc1_8_s4 (retarray, array, pdim, string_len);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxloc1_8_s4 (retarray, array, pdim, back, string_len);
index_type n;
int mask_kind;
+ if (mask == NULL)
+ {
+ maxval0_s1 (ret, xlen, array, len);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
GFC_LOGICAL_4 *mask, gfc_charlen_type len)
{
- if (*mask)
+ if (mask == NULL || *mask)
{
maxval0_s1 (ret, xlen, array, len);
return;
index_type n;
int mask_kind;
+ if (mask == NULL)
+ {
+ maxval0_s4 (ret, xlen, array, len);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
GFC_LOGICAL_4 *mask, gfc_charlen_type len)
{
- if (*mask)
+ if (mask == NULL || *mask)
{
maxval0_s4 (ret, xlen, array, len);
return;
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+ maxval1_s1 (retarray, xlen, array, pdim, string_len);
+ return;
+ }
+
assert (xlen == string_len);
dim = (*pdim) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxval1_s1 (retarray, xlen, array, pdim, string_len);
return;
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+ maxval1_s4 (retarray, xlen, array, pdim, string_len);
+ return;
+ }
+
assert (xlen == string_len);
dim = (*pdim) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxval1_s4 (retarray, xlen, array, pdim, string_len);
return;
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxval_i1 (retarray, array, pdim, back);
+#else
+ maxval_i1 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxval_i1 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxval_i16 (retarray, array, pdim, back);
+#else
+ maxval_i16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxval_i16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxval_i2 (retarray, array, pdim, back);
+#else
+ maxval_i2 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxval_i2 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxval_i4 (retarray, array, pdim, back);
+#else
+ maxval_i4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxval_i4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxval_i8 (retarray, array, pdim, back);
+#else
+ maxval_i8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxval_i8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxval_r10 (retarray, array, pdim, back);
+#else
+ maxval_r10 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxval_r10 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxval_r16 (retarray, array, pdim, back);
+#else
+ maxval_r16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxval_r16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxval_r4 (retarray, array, pdim, back);
+#else
+ maxval_r4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxval_r4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ maxval_r8 (retarray, array, pdim, back);
+#else
+ maxval_r8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
maxval_r8 (retarray, array, pdim, back);
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_16_i1 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_16_i1 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_16_i16 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_16_i16 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_16_i2 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_16_i2 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_16_i4 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_16_i4 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_16_i8 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_16_i8 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_16_r10 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_16_r10 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_16_r16 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_16_r16 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_16_r4 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_16_r4 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_16_r8 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_16_r8 (retarray, array, back);
return;
index_type n;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc0_16_s1 (retarray, array, back, len);
+#else
+ minloc0_16_s1 (retarray, array, len);
+#endif
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc0_16_s1 (retarray, array, back, len);
index_type n;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc0_16_s4 (retarray, array, back, len);
+#else
+ minloc0_16_s4 (retarray, array, len);
+#endif
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_16 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc0_16_s4 (retarray, array, back, len);
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_4_i1 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_4_i1 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_4_i16 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_4_i16 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_4_i2 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_4_i2 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_4_i4 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_4_i4 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_4_i8 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_4_i8 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_4_r10 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_4_r10 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_4_r16 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_4_r16 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_4_r4 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_4_r4 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_4_r8 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_4_r8 (retarray, array, back);
return;
index_type n;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc0_4_s1 (retarray, array, back, len);
+#else
+ minloc0_4_s1 (retarray, array, len);
+#endif
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc0_4_s1 (retarray, array, back, len);
index_type n;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc0_4_s4 (retarray, array, back, len);
+#else
+ minloc0_4_s4 (retarray, array, len);
+#endif
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_4 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc0_4_s4 (retarray, array, back, len);
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_8_i1 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_8_i1 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_8_i16 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_8_i16 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_8_i2 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_8_i2 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_8_i4 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_8_i4 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_8_i8 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_8_i8 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_8_r10 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_8_r10 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_8_r16 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_8_r16 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_8_r4 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_8_r4 (retarray, array, back);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ minloc0_8_r8 (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
minloc0_8_r8 (retarray, array, back);
return;
index_type n;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc0_8_s1 (retarray, array, back, len);
+#else
+ minloc0_8_s1 (retarray, array, len);
+#endif
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc0_8_s1 (retarray, array, back, len);
index_type n;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc0_8_s4 (retarray, array, back, len);
+#else
+ minloc0_8_s4 (retarray, array, len);
+#endif
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc0_8_s4 (retarray, array, back, len);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_16_i1 (retarray, array, pdim, back);
+#else
+ minloc1_16_i1 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_16_i1 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_16_i16 (retarray, array, pdim, back);
+#else
+ minloc1_16_i16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_16_i16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_16_i2 (retarray, array, pdim, back);
+#else
+ minloc1_16_i2 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_16_i2 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_16_i4 (retarray, array, pdim, back);
+#else
+ minloc1_16_i4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_16_i4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_16_i8 (retarray, array, pdim, back);
+#else
+ minloc1_16_i8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_16_i8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_16_r10 (retarray, array, pdim, back);
+#else
+ minloc1_16_r10 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_16_r10 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_16_r16 (retarray, array, pdim, back);
+#else
+ minloc1_16_r16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_16_r16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_16_r4 (retarray, array, pdim, back);
+#else
+ minloc1_16_r4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_16_r4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_16_r8 (retarray, array, pdim, back);
+#else
+ minloc1_16_r8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_16_r8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_16_s1 (retarray, array, pdim, back, string_len);
+#else
+ minloc1_16_s1 (retarray, array, pdim, string_len);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_16_s1 (retarray, array, pdim, back, string_len);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_16_s4 (retarray, array, pdim, back, string_len);
+#else
+ minloc1_16_s4 (retarray, array, pdim, string_len);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_16_s4 (retarray, array, pdim, back, string_len);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_4_i1 (retarray, array, pdim, back);
+#else
+ minloc1_4_i1 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_4_i1 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_4_i16 (retarray, array, pdim, back);
+#else
+ minloc1_4_i16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_4_i16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_4_i2 (retarray, array, pdim, back);
+#else
+ minloc1_4_i2 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_4_i2 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_4_i4 (retarray, array, pdim, back);
+#else
+ minloc1_4_i4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_4_i4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_4_i8 (retarray, array, pdim, back);
+#else
+ minloc1_4_i8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_4_i8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_4_r10 (retarray, array, pdim, back);
+#else
+ minloc1_4_r10 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_4_r10 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_4_r16 (retarray, array, pdim, back);
+#else
+ minloc1_4_r16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_4_r16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_4_r4 (retarray, array, pdim, back);
+#else
+ minloc1_4_r4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_4_r4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_4_r8 (retarray, array, pdim, back);
+#else
+ minloc1_4_r8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_4_r8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_4_s1 (retarray, array, pdim, back, string_len);
+#else
+ minloc1_4_s1 (retarray, array, pdim, string_len);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_4_s1 (retarray, array, pdim, back, string_len);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_4_s4 (retarray, array, pdim, back, string_len);
+#else
+ minloc1_4_s4 (retarray, array, pdim, string_len);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_4_s4 (retarray, array, pdim, back, string_len);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_8_i1 (retarray, array, pdim, back);
+#else
+ minloc1_8_i1 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_8_i1 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_8_i16 (retarray, array, pdim, back);
+#else
+ minloc1_8_i16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_8_i16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_8_i2 (retarray, array, pdim, back);
+#else
+ minloc1_8_i2 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_8_i2 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_8_i4 (retarray, array, pdim, back);
+#else
+ minloc1_8_i4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_8_i4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_8_i8 (retarray, array, pdim, back);
+#else
+ minloc1_8_i8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_8_i8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_8_r10 (retarray, array, pdim, back);
+#else
+ minloc1_8_r10 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_8_r10 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_8_r16 (retarray, array, pdim, back);
+#else
+ minloc1_8_r16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_8_r16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_8_r4 (retarray, array, pdim, back);
+#else
+ minloc1_8_r4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_8_r4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_8_r8 (retarray, array, pdim, back);
+#else
+ minloc1_8_r8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_8_r8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_8_s1 (retarray, array, pdim, back, string_len);
+#else
+ minloc1_8_s1 (retarray, array, pdim, string_len);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_8_s1 (retarray, array, pdim, back, string_len);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minloc1_8_s4 (retarray, array, pdim, back, string_len);
+#else
+ minloc1_8_s4 (retarray, array, pdim, string_len);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minloc1_8_s4 (retarray, array, pdim, back, string_len);
index_type n;
int mask_kind;
+ if (mask == NULL)
+ {
+ minval0_s1 (ret, xlen, array, len);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
GFC_LOGICAL_4 *mask, gfc_charlen_type len)
{
- if (*mask)
+ if (mask == NULL || *mask)
{
minval0_s1 (ret, xlen, array, len);
return;
index_type n;
int mask_kind;
+ if (mask == NULL)
+ {
+ minval0_s4 (ret, xlen, array, len);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
GFC_LOGICAL_4 *mask, gfc_charlen_type len)
{
- if (*mask)
+ if (mask == NULL || *mask)
{
minval0_s4 (ret, xlen, array, len);
return;
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+ minval1_s1 (retarray, xlen, array, pdim, string_len);
+ return;
+ }
+
assert (xlen == string_len);
dim = (*pdim) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
minval1_s1 (retarray, xlen, array, pdim, string_len);
return;
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+ minval1_s4 (retarray, xlen, array, pdim, string_len);
+ return;
+ }
+
assert (xlen == string_len);
dim = (*pdim) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
minval1_s4 (retarray, xlen, array, pdim, string_len);
return;
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minval_i1 (retarray, array, pdim, back);
+#else
+ minval_i1 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minval_i1 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minval_i16 (retarray, array, pdim, back);
+#else
+ minval_i16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minval_i16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minval_i2 (retarray, array, pdim, back);
+#else
+ minval_i2 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minval_i2 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minval_i4 (retarray, array, pdim, back);
+#else
+ minval_i4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minval_i4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minval_i8 (retarray, array, pdim, back);
+#else
+ minval_i8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minval_i8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minval_r10 (retarray, array, pdim, back);
+#else
+ minval_r10 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minval_r10 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minval_r16 (retarray, array, pdim, back);
+#else
+ minval_r16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minval_r16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minval_r4 (retarray, array, pdim, back);
+#else
+ minval_r4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minval_r4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ minval_r8 (retarray, array, pdim, back);
+#else
+ minval_r8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
minval_r8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ product_c10 (retarray, array, pdim, back);
+#else
+ product_c10 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
product_c10 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ product_c16 (retarray, array, pdim, back);
+#else
+ product_c16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
product_c16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ product_c4 (retarray, array, pdim, back);
+#else
+ product_c4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
product_c4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ product_c8 (retarray, array, pdim, back);
+#else
+ product_c8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
product_c8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ product_i1 (retarray, array, pdim, back);
+#else
+ product_i1 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
product_i1 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ product_i16 (retarray, array, pdim, back);
+#else
+ product_i16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
product_i16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ product_i2 (retarray, array, pdim, back);
+#else
+ product_i2 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
product_i2 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ product_i4 (retarray, array, pdim, back);
+#else
+ product_i4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
product_i4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ product_i8 (retarray, array, pdim, back);
+#else
+ product_i8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
product_i8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ product_r10 (retarray, array, pdim, back);
+#else
+ product_r10 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
product_r10 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ product_r16 (retarray, array, pdim, back);
+#else
+ product_r16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
product_r16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ product_r4 (retarray, array, pdim, back);
+#else
+ product_r4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
product_r4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ product_r8 (retarray, array, pdim, back);
+#else
+ product_r8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
product_r8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ sum_c10 (retarray, array, pdim, back);
+#else
+ sum_c10 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
sum_c10 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ sum_c16 (retarray, array, pdim, back);
+#else
+ sum_c16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
sum_c16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ sum_c4 (retarray, array, pdim, back);
+#else
+ sum_c4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
sum_c4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ sum_c8 (retarray, array, pdim, back);
+#else
+ sum_c8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
sum_c8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ sum_i1 (retarray, array, pdim, back);
+#else
+ sum_i1 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
sum_i1 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ sum_i16 (retarray, array, pdim, back);
+#else
+ sum_i16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
sum_i16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ sum_i2 (retarray, array, pdim, back);
+#else
+ sum_i2 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
sum_i2 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ sum_i4 (retarray, array, pdim, back);
+#else
+ sum_i4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
sum_i4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ sum_i8 (retarray, array, pdim, back);
+#else
+ sum_i8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
sum_i8 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ sum_r10 (retarray, array, pdim, back);
+#else
+ sum_r10 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
sum_r10 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ sum_r16 (retarray, array, pdim, back);
+#else
+ sum_r16 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
sum_r16 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ sum_r4 (retarray, array, pdim, back);
+#else
+ sum_r4 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
sum_r4 (retarray, array, pdim, back);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ sum_r8 (retarray, array, pdim, back);
+#else
+ sum_r8 (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
sum_r8 (retarray, array, pdim, back);
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
index_type * restrict dest;
index_type n;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc0_'atype_code` (retarray, array, value, back'len_arg`);
return;
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else if (unlikely (compile_options.bounds_check))
{
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
index_type dim;
bool continue_loop;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc1_'atype_code`'` (retarray, array, value, pdim, back'len_arg`'`);
return;
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (index_type));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
}
'header3`'`
{
- if (*mask)
+ if (mask == NULL || *mask)
{
return findloc2_'atype_code` (array, value, back, len_array, len_value);
}
index_type n;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ name`'rtype_qual`_'atype_code (retarray, array, back, len);
+#else
+ name`'rtype_qual`_'atype_code (retarray, array, len);
+#endif
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
'rtype_name *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
name`'rtype_qual`_'atype_code (retarray, array, back, len);
index_type n;
int mask_kind;
+ if (mask == NULL)
+ {
+ name`'rtype_qual`_'atype_code (ret, xlen, array, len);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
GFC_LOGICAL_4 *mask, gfc_charlen_type len)
{
- if (*mask)
+ if (mask == NULL || *mask)
{
name`'rtype_qual`_'atype_code (ret, xlen, array, len);
return;
index_type n;
int mask_kind;
+
+ if (mask == NULL)
+ {
+ name`'rtype_qual`_'atype_code (retarray, array, back);
+ return;
+ }
+
rank = GFC_DESCRIPTOR_RANK (array);
if (rank <= 0)
runtime_error ("Rank of array needs to be > 0");
index_type n;
rtype_name *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
name`'rtype_qual`_'atype_code (retarray, array, back);
return;
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#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;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
name`'rtype_qual`_'atype_code (retarray, array, pdim, back, string_len);
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+ name`'rtype_qual`_'atype_code (retarray, xlen, array, pdim, string_len);
+ return;
+ }
+
assert (xlen == string_len);
dim = (*pdim) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
name`'rtype_qual`_'atype_code (retarray, xlen, array, pdim, string_len);
return;
index_type mdelta;
int mask_kind;
+ if (mask == NULL)
+ {
+#ifdef HAVE_BACK_ARG
+ name`'rtype_qual`_'atype_code (retarray, array, pdim, back);
+#else
+ name`'rtype_qual`_'atype_code (retarray, array, pdim);
+#endif
+ return;
+ }
+
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
index_type dim;
- if (*mask)
+ if (mask == NULL || *mask)
{
#ifdef HAVE_BACK_ARG
name`'rtype_qual`_'atype_code (retarray, array, pdim, back);