]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/generated/sum_i8.c
Update copyright years.
[thirdparty/gcc.git] / libgfortran / generated / sum_i8.c
index 9c5c17b70c2c7af55c4846fd15548c586c27268c..012a97c50cc97f62dd2a11a0e06642a214776479 100644 (file)
@@ -1,5 +1,5 @@
 /* Implementation of the SUM intrinsic
-   Copyright (C) 2002-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002-2022 Free Software Foundation, Inc.
    Contributed by Paul Brook <paul@nowt.org>
 
 This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -220,6 +220,16 @@ msum_i8 (gfc_array_i8 * const restrict retarray,
   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;
 
@@ -399,7 +409,7 @@ ssum_i8 (gfc_array_i8 * const restrict retarray,
   index_type dim;
 
 
-  if (*mask)
+  if (mask == NULL || *mask)
     {
 #ifdef HAVE_BACK_ARG
       sum_i8 (retarray, array, pdim, back);