diff libgfortran/generated/minloc1_16_s1.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line diff
--- a/libgfortran/generated/minloc1_16_s1.c	Thu Oct 25 07:37:49 2018 +0900
+++ b/libgfortran/generated/minloc1_16_s1.c	Thu Feb 13 11:34:05 2020 +0900
@@ -1,5 +1,5 @@
 /* Implementation of the MINLOC intrinsic
-   Copyright (C) 2017-2018 Free Software Foundation, Inc.
+   Copyright (C) 2017-2020 Free Software Foundation, Inc.
    Contributed by Thomas Koenig
 
 This file is part of the GNU Fortran runtime library (libgfortran).
@@ -26,7 +26,7 @@
 #include "libgfortran.h"
 
 
-#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_16)
+#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_INTEGER_16)
 
 #define HAVE_BACK_ARG 1
 
@@ -34,9 +34,9 @@
 #include <assert.h>
 
 static inline int
-compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
+compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
 {
-  if (sizeof (GFC_INTEGER_1) == 1)
+  if (sizeof (GFC_UINTEGER_1) == 1)
     return memcmp (a, b, n);
   else
     return memcmp_char4 (a, b, n);
@@ -57,7 +57,7 @@
   index_type extent[GFC_MAX_DIMENSIONS];
   index_type sstride[GFC_MAX_DIMENSIONS];
   index_type dstride[GFC_MAX_DIMENSIONS];
-  const GFC_INTEGER_1 * restrict base;
+  const GFC_UINTEGER_1 * restrict base;
   GFC_INTEGER_16 * restrict dest;
   index_type rank;
   index_type n;
@@ -155,12 +155,12 @@
   continue_loop = 1;
   while (continue_loop)
     {
-      const GFC_INTEGER_1 * restrict src;
+      const GFC_UINTEGER_1 * restrict src;
       GFC_INTEGER_16 result;
       src = base;
       {
 
-	const GFC_INTEGER_1 *minval;
+	const GFC_UINTEGER_1 *minval;
 	minval = NULL;
 	result = 0;
 	if (len <= 0)
@@ -231,7 +231,7 @@
   index_type dstride[GFC_MAX_DIMENSIONS];
   index_type mstride[GFC_MAX_DIMENSIONS];
   GFC_INTEGER_16 * restrict dest;
-  const GFC_INTEGER_1 * restrict base;
+  const GFC_UINTEGER_1 * restrict base;
   const GFC_LOGICAL_1 * restrict mbase;
   index_type rank;
   index_type dim;
@@ -241,6 +241,16 @@
   index_type mdelta;
   int mask_kind;
 
+  if (mask == NULL)
+    {
+#ifdef HAVE_BACK_ARG
+      minloc1_16_s1 (retarray, array, pdim, back, string_len);
+#else
+      minloc1_16_s1 (retarray, array, pdim, string_len);
+#endif
+      return;
+    }
+
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
 
@@ -349,14 +359,14 @@
 
   while (base)
     {
-      const GFC_INTEGER_1 * restrict src;
+      const GFC_UINTEGER_1 * restrict src;
       const GFC_LOGICAL_1 * restrict msrc;
       GFC_INTEGER_16 result;
       src = base;
       msrc = mbase;
       {
 
-	const GFC_INTEGER_1 *minval;
+	const GFC_UINTEGER_1 *minval;
 	minval = base;
 	result = 0;
 	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
@@ -436,7 +446,7 @@
   index_type dim;
 
 
-  if (*mask)
+  if (mask == NULL || *mask)
     {
 #ifdef HAVE_BACK_ARG
       minloc1_16_s1 (retarray, array, pdim, back, string_len);