aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/generated/eoshift1_8.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/eoshift1_8.c')
-rw-r--r--libgfortran/generated/eoshift1_8.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/libgfortran/generated/eoshift1_8.c b/libgfortran/generated/eoshift1_8.c
index bfa6088..75d0f1e 100644
--- a/libgfortran/generated/eoshift1_8.c
+++ b/libgfortran/generated/eoshift1_8.c
@@ -37,14 +37,14 @@ Boston, MA 02111-1307, USA. */
static const char zeros[16] =
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-extern void eoshift1_8 (const gfc_array_char *,
+extern void eoshift1_8 (gfc_array_char *,
const gfc_array_char *,
const gfc_array_i8 *, const char *,
const GFC_INTEGER_8 *);
export_proto(eoshift1_8);
void
-eoshift1_8 (const gfc_array_char *ret,
+eoshift1_8 (gfc_array_char *ret,
const gfc_array_char *array,
const gfc_array_i8 *h, const char *pbound,
const GFC_INTEGER_8 *pwhich)
@@ -95,6 +95,26 @@ eoshift1_8 (const gfc_array_char *ret,
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++)
{