/* Implementation of the MAXLOC intrinsic
- Copyright (C) 2002-2018 Free Software Foundation, Inc.
+ Copyright (C) 2002-2024 Free Software Foundation, Inc.
Contributed by Paul Brook <paul@nowt.org>
This file is part of the GNU Fortran 95 runtime library (libgfortran).
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;