Contributed by Paul Brook <paul@nowt.org>
This file is part of the GNU Fortran 95 runtime library (libgfortran).
Contributed by Paul Brook <paul@nowt.org>
This file is part of the GNU Fortran 95 runtime library (libgfortran).
static const char zeros[16] =
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
static const char zeros[16] =
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
const gfc_array_char *,
const gfc_array_i8 *, const char *,
const GFC_INTEGER_8 *);
export_proto(eoshift1_8);
void
const gfc_array_char *,
const gfc_array_i8 *, const char *,
const GFC_INTEGER_8 *);
export_proto(eoshift1_8);
void
const gfc_array_char *array,
const gfc_array_i8 *h, const char *pbound,
const GFC_INTEGER_8 *pwhich)
{
/* r.* indicates the return array. */
const gfc_array_char *array,
const gfc_array_i8 *h, const char *pbound,
const GFC_INTEGER_8 *pwhich)
{
/* r.* indicates the return array. */
+
+ if (ret->data == NULL)
+ {
+ int i;
+
+ ret->data = internal_malloc_size (size * size0 ((array_t *)array));
+ ret->base = 0;
+ ret->dtype = array->dtype;
+ for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
+ {
+ ret->dim[i].lbound = 0;
+ ret->dim[i].ubound = array->dim[i].ubound - array->dim[i].lbound;
+
+ if (i == 0)
+ ret->dim[i].stride = 1;
+ else
+ ret->dim[i].stride = (ret->dim[i-1].ubound + 1) * ret->dim[i-1].stride;
+ }
+ }
+