/* Special implementation of the SPREAD intrinsic
- Copyright 2008, 2009, 2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2015 Free Software Foundation, Inc.
Contributed by Thomas Koenig <tkoenig@gcc.gnu.org>, based on
spread_generic.c written by Paul Brook <paul@nowt.org>
}
ret->offset = 0;
- /* internal_malloc_size allocates a single byte for zero size. */
- ret->base_addr = internal_malloc_size (rs * sizeof(GFC_REAL_8));
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_8));
if (rs <= 0)
return;
}
if (ret->base_addr == NULL)
{
- ret->base_addr = internal_malloc_size (ncopies * sizeof (GFC_REAL_8));
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_8));
ret->offset = 0;
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
}