]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/m4/in_unpack.m4
Update copyright years.
[thirdparty/gcc.git] / libgfortran / m4 / in_unpack.m4
index e8b29dbd3b5f4c9fe094c44e1d573b088e394b5d..e44d128f914747efad9c0a4af302f8fdf1d9a6a6 100644 (file)
@@ -1,5 +1,5 @@
 `/* Helper function for repacking arrays.
-   Copyright 2003, 2006, 2007, 2009, 2012 Free Software Foundation, Inc.
+   Copyright (C) 2003-2020 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>'
 
 include(iparm.m4)dnl
@@ -44,7 +42,6 @@ internal_unpack_'rtype_ccode` ('rtype` * d, const 'rtype_name` * src)
   index_type dim;
   index_type dsize;
   'rtype_name` * restrict dest;
-  int n;
 
   dest = d->base_addr;
   if (src == dest || !src)
@@ -52,7 +49,7 @@ internal_unpack_'rtype_ccode` ('rtype` * d, const 'rtype_name` * 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);
@@ -82,7 +79,7 @@ internal_unpack_'rtype_ccode` ('rtype` * d, const 'rtype_name` * 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