]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/generated/maxval_r16.c
Update copyright years.
[thirdparty/gcc.git] / libgfortran / generated / maxval_r16.c
index 1eaae8c5d34d8dbb9f66bbd4ff2a2cd2df6e0cae..c9e4d02717508d8feecd50314f6a57c42425a280 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).
@@ -100,7 +100,7 @@ maxval_r16 (gfc_array_r16 * const restrict retarray,
        }
 
       retarray->offset = 0;
-      GFC_DTYPE_COPY_SETRANK(retarray,array,rank);
+      retarray->dtype.rank = rank;
 
       alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
@@ -154,8 +154,10 @@ maxval_r16 (gfc_array_r16 * const restrict retarray,
          *dest = -GFC_REAL_16_HUGE;
        else
          {
+#if ! defined HAVE_BACK_ARG
            for (n = 0; n < len; n++, src += delta)
              {
+#endif
 
 #if defined (GFC_REAL_16_QUIET_NAN)
                if (*src >= result)
@@ -232,6 +234,16 @@ mmaxval_r16 (gfc_array_r16 * const restrict retarray,
   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;
 
@@ -301,7 +313,7 @@ mmaxval_r16 (gfc_array_r16 * const restrict retarray,
       alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
       retarray->offset = 0;
-      GFC_DTYPE_COPY_SETRANK(retarray,array,rank);
+      retarray->dtype.rank = rank;
 
       if (alloc_size == 0)
        {
@@ -439,9 +451,13 @@ smaxval_r16 (gfc_array_r16 * const restrict retarray,
   index_type dim;
 
 
-  if (*mask)
+  if (mask == NULL || *mask)
     {
+#ifdef HAVE_BACK_ARG
+      maxval_r16 (retarray, array, pdim, back);
+#else
       maxval_r16 (retarray, array, pdim);
+#endif
       return;
     }
   /* Make dim zero based to avoid confusion.  */
@@ -488,7 +504,7 @@ smaxval_r16 (gfc_array_r16 * const restrict retarray,
        }
 
       retarray->offset = 0;
-      GFC_DTYPE_COPY_SETRANK(retarray,array,rank);
+      retarray->dtype.rank = rank;
 
       alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];