static const char zeros[16] =
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-extern void eoshift1_`'atype_kind (const gfc_array_char *,
+extern void eoshift1_`'atype_kind (gfc_array_char *,
const gfc_array_char *,
const atype *, const char *,
const atype_name *);
export_proto(eoshift1_`'atype_kind);
void
-eoshift1_`'atype_kind (const gfc_array_char *ret,
+eoshift1_`'atype_kind (gfc_array_char *ret,
const gfc_array_char *array,
const atype *h, const char *pbound,
const atype_name *pwhich)
extent[0] = 1;
count[0] = 0;
size = GFC_DESCRIPTOR_SIZE (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;
+ }
+ }
+
n = 0;
for (dim = 0; dim < GFC_DESCRIPTOR_RANK (array); dim++)
{