summaryrefslogtreecommitdiff
path: root/libgfortran/generated/maxloc0_8_i8.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/maxloc0_8_i8.c')
-rw-r--r--libgfortran/generated/maxloc0_8_i8.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libgfortran/generated/maxloc0_8_i8.c b/libgfortran/generated/maxloc0_8_i8.c
index ff9de7fa01a..9e1abfbcb50 100644
--- a/libgfortran/generated/maxloc0_8_i8.c
+++ b/libgfortran/generated/maxloc0_8_i8.c
@@ -198,6 +198,13 @@ mmaxloc0_8_i8 (gfc_array_i8 * const restrict retarray,
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");
@@ -369,7 +376,7 @@ smaxloc0_8_i8 (gfc_array_i8 * const restrict retarray,
index_type n;
GFC_INTEGER_8 *dest;
- if (*mask)
+ if (mask == NULL || *mask)
{
maxloc0_8_i8 (retarray, array, back);
return;