]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/generated/maxval_i4.c
Update copyright years.
[thirdparty/gcc.git] / libgfortran / generated / maxval_i4.c
index ae36fd4aa3ee20398a340abe210ba9a16f96383f..abad45b50ae52ab25693baf69ca8db5e194a01e7 100644 (file)
@@ -1,5 +1,5 @@
 /* Implementation of the MAXVAL intrinsic
-   Copyright (C) 2002-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002-2020 Free Software Foundation, Inc.
    Contributed by Paul Brook <paul@nowt.org>
 
 This file is part of the GNU Fortran runtime library (libgfortran).
@@ -234,6 +234,16 @@ mmaxval_i4 (gfc_array_i4 * const restrict retarray,
   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;
 
@@ -441,7 +451,7 @@ smaxval_i4 (gfc_array_i4 * const restrict retarray,
   index_type dim;
 
 
-  if (*mask)
+  if (mask == NULL || *mask)
     {
 #ifdef HAVE_BACK_ARG
       maxval_i4 (retarray, array, pdim, back);