/* Helper function for repacking arrays.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2006, 2007 Free Software Foundation, Inc.
Contributed by Paul Brook <paul@nowt.org>
This file is part of the GNU Fortran 95 runtime library (libgfortran).
write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-#include "config.h"
+#include "libgfortran.h"
#include <stdlib.h>
#include <assert.h>
#include <string.h>
-#include "libgfortran.h"
+
#if defined (HAVE_GFC_COMPLEX_10)
index_type stride0;
index_type dim;
index_type dsize;
- GFC_COMPLEX_10 *dest;
+ GFC_COMPLEX_10 * restrict dest;
int n;
dest = d->data;
if (src == dest || !src)
return;
- if (d->dim[0].stride == 0)
- d->dim[0].stride = 1;
-
dim = GFC_DESCRIPTOR_RANK (d);
dsize = 1;
for (n = 0; n < dim; n++)
stride[n] = d->dim[n].stride;
extent[n] = d->dim[n].ubound + 1 - d->dim[n].lbound;
if (extent[n] <= 0)
- abort ();
+ return;
if (dsize == stride[n])
- dsize *= extent[n];
+ dsize *= extent[n];
else
- dsize = 0;
+ dsize = 0;
}
if (dsize != 0)
the next dimension. */
count[n] = 0;
/* We could precalculate these products, but this is a less
- frequently used path so proabably not worth it. */
+ frequently used path so probably not worth it. */
dest -= stride[n] * extent[n];
n++;
if (n == dim)
}
#endif
+