]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/generated/in_unpack_i4.c
Update copyright years.
[thirdparty/gcc.git] / libgfortran / generated / in_unpack_i4.c
index 6fc836b7c16fad3d7a637d2d1589bdfdea90e90b..782402d39d17a6e9c135fcf4d943c8c5e76a3593 100644 (file)
@@ -1,5 +1,5 @@
 /* Helper function for repacking arrays.
-   Copyright 2003, 2006, 2007, 2009, 2012 Free Software Foundation, Inc.
+   Copyright (C) 2003-2024 Free Software Foundation, Inc.
    Contributed by Paul Brook <paul@nowt.org>
 
 This file is part of the GNU Fortran runtime library (libgfortran).
@@ -24,8 +24,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
 #include "libgfortran.h"
-#include <stdlib.h>
-#include <assert.h>
 #include <string.h>
 
 
@@ -41,7 +39,6 @@ internal_unpack_4 (gfc_array_i4 * d, const GFC_INTEGER_4 * src)
   index_type dim;
   index_type dsize;
   GFC_INTEGER_4 * restrict dest;
-  int n;
 
   dest = d->base_addr;
   if (src == dest || !src)
@@ -49,7 +46,7 @@ internal_unpack_4 (gfc_array_i4 * d, const GFC_INTEGER_4 * src)
 
   dim = GFC_DESCRIPTOR_RANK (d);
   dsize = 1;
-  for (n = 0; n < dim; n++)
+  for (index_type n = 0; n < dim; n++)
     {
       count[n] = 0;
       stride[n] = GFC_DESCRIPTOR_STRIDE(d,n);
@@ -79,7 +76,7 @@ internal_unpack_4 (gfc_array_i4 * d, const GFC_INTEGER_4 * src)
       dest += stride0;
       count[0]++;
       /* Advance to the next source element.  */
-      n = 0;
+      index_type n = 0;
       while (count[n] == extent[n])
         {
           /* When we get to the end of a dimension, reset it and increment