`/* Specific implementation of the PACK intrinsic
- Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2012
- 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).
<http://www.gnu.org/licenses/>. */
#include "libgfortran.h"
-#include <stdlib.h>
-#include <assert.h>
#include <string.h>'
include(iparm.m4)dnl
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
ret->offset = 0;
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * total);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (total, sizeof ('rtype_name`));
if (total == 0)
return;