summaryrefslogtreecommitdiff
path: root/libgfortran/generated/cshift1_4.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/cshift1_4.c')
-rw-r--r--libgfortran/generated/cshift1_4.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/libgfortran/generated/cshift1_4.c b/libgfortran/generated/cshift1_4.c
index 683ce703ff2..b86f9e51c7e 100644
--- a/libgfortran/generated/cshift1_4.c
+++ b/libgfortran/generated/cshift1_4.c
@@ -34,13 +34,13 @@ Boston, MA 02111-1307, USA. */
#include <string.h>
#include "libgfortran.h"
-void cshift1_4 (const gfc_array_char * ret,
+void cshift1_4 (gfc_array_char * ret,
const gfc_array_char * array,
const gfc_array_i4 * h, const GFC_INTEGER_4 * pwhich);
export_proto(cshift1_4);
void
-cshift1_4 (const gfc_array_char * ret,
+cshift1_4 (gfc_array_char * ret,
const gfc_array_char * array,
const gfc_array_i4 * h, const GFC_INTEGER_4 * pwhich)
{
@@ -80,6 +80,25 @@ cshift1_4 (const gfc_array_char * ret,
size = GFC_DESCRIPTOR_SIZE (ret);
+ 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;
+ }
+ }
+
extent[0] = 1;
count[0] = 0;
size = GFC_DESCRIPTOR_SIZE (array);