]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/m4/pack.m4
Update copyright years.
[thirdparty/gcc.git] / libgfortran / m4 / pack.m4
index abfd1e7e5136a1b9295bc9f331ed8d83cd36c5a9..0f0c87ce1c32bb2529ab779349ef8b05825b40f8 100644 (file)
@@ -1,5 +1,5 @@
 `/* Specific implementation of the PACK intrinsic
-   Copyright (C) 2002-2015 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).
@@ -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
@@ -99,6 +97,9 @@ pack_'rtype_code` ('rtype` *ret, const 'rtype` *array,
 
   dim = GFC_DESCRIPTOR_RANK (array);
 
+  sstride[0] = 0; /* Avoid warnings if not initialized.  */
+  mstride[0] = 0;
+
   mptr = mask->base_addr;
 
   /* Use the same loop for all logical types, by using GFC_LOGICAL_1