]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/generated/minloc1_8_i2.c
Update copyright years.
[thirdparty/gcc.git] / libgfortran / generated / minloc1_8_i2.c
index e020bfe3b491be9342077f4068d03c2bea503ed7..ba5e54dd31677e04c093b0ae0c0cf26ae16f0fe3 100644 (file)
@@ -1,5 +1,5 @@
 /* Implementation of the MINLOC intrinsic
-   Copyright (C) 2002-2023 Free Software Foundation, Inc.
+   Copyright (C) 2002-2024 Free Software Foundation, Inc.
    Contributed by Paul Brook <paul@nowt.org>
 
 This file is part of the GNU Fortran runtime library (libgfortran).
@@ -109,12 +109,7 @@ minloc1_8_i2 (gfc_array_i8 * const restrict retarray,
 
       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
       if (alloc_size == 0)
-       {
-         /* Make sure we have a zero-sized array.  */
-         GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1);
-         return;
-
-       }
+       return;
     }
   else
     {
@@ -280,8 +275,8 @@ mminloc1_8_i2 (gfc_array_i8 * const restrict retarray,
     }
 
   len = GFC_DESCRIPTOR_EXTENT(array,dim);
-  if (len <= 0)
-    return;
+  if (len < 0)
+    len = 0;
 
   mbase = mask->base_addr;
 
@@ -339,15 +334,9 @@ mminloc1_8_i2 (gfc_array_i8 * const restrict retarray,
       retarray->offset = 0;
       retarray->dtype.rank = rank;
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
       if (alloc_size == 0)
-       {
-         /* Make sure we have a zero-sized array.  */
-         GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1);
-         return;
-       }
-      else
-       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
-
+       return;
     }
   else
     {
@@ -547,14 +536,9 @@ sminloc1_8_i2 (gfc_array_i8 * const restrict retarray,
 
       alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
 
+      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
       if (alloc_size == 0)
-       {
-         /* Make sure we have a zero-sized array.  */
-         GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1);
-         return;
-       }
-      else
-       retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
+       return;
     }
   else
     {