diff options
Diffstat (limited to 'libgfortran/generated/eoshift1_8.c')
-rw-r--r-- | libgfortran/generated/eoshift1_8.c | 74 |
1 files changed, 47 insertions, 27 deletions
diff --git a/libgfortran/generated/eoshift1_8.c b/libgfortran/generated/eoshift1_8.c index 5da23ce95e59..f375a825113b 100644 --- a/libgfortran/generated/eoshift1_8.c +++ b/libgfortran/generated/eoshift1_8.c @@ -34,20 +34,10 @@ Boston, MA 02110-1301, USA. */ #include <string.h> #include "libgfortran.h" -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 (gfc_array_char *, - const gfc_array_char *, - const gfc_array_i8 *, const char *, - const GFC_INTEGER_8 *); -export_proto(eoshift1_8); - -void -eoshift1_8 (gfc_array_char *ret, - const gfc_array_char *array, - const gfc_array_i8 *h, const char *pbound, - const GFC_INTEGER_8 *pwhich) +static void +eoshift1 (gfc_array_char *ret, const gfc_array_char *array, const gfc_array_i8 *h, + const char *pbound, const GFC_INTEGER_8 *pwhich, index_type size, + char filler) { /* r.* indicates the return array. */ index_type rstride[GFC_MAX_DIMENSIONS]; @@ -69,7 +59,6 @@ eoshift1_8 (gfc_array_char *ret, index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; index_type dim; - index_type size; index_type len; index_type n; int which; @@ -87,14 +76,8 @@ eoshift1_8 (gfc_array_char *ret, else which = 0; - if (!pbound) - pbound = zeros; - - size = GFC_DESCRIPTOR_SIZE (ret); - extent[0] = 1; count[0] = 0; - size = GFC_DESCRIPTOR_SIZE (array); if (ret->data == NULL) { @@ -135,7 +118,7 @@ eoshift1_8 (gfc_array_char *ret, rstride[n] = ret->dim[dim].stride * size; sstride[n] = array->dim[dim].stride * size; - hstride[n] = h->dim[n].stride * size; + hstride[n] = h->dim[n].stride; n++; } } @@ -186,11 +169,18 @@ eoshift1_8 (gfc_array_char *ret, dest = rptr; n = delta; - while (n--) - { - memcpy (dest, pbound, size); - dest += roffset; - } + if (pbound) + while (n--) + { + memcpy (dest, pbound, size); + dest += roffset; + } + else + while (n--) + { + memset (dest, filler, size); + dest += roffset; + } /* Advance to the next section. */ rptr += rstride0; @@ -225,3 +215,33 @@ eoshift1_8 (gfc_array_char *ret, } } } + +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 (gfc_array_char *ret, const gfc_array_char *array, + const gfc_array_i8 *h, const char *pbound, + const GFC_INTEGER_8 *pwhich) +{ + eoshift1 (ret, array, h, pbound, pwhich, GFC_DESCRIPTOR_SIZE (array), 0); +} + +void eoshift1_8_char (gfc_array_char *, GFC_INTEGER_4, + const gfc_array_char *, const gfc_array_i8 *, + const char *, const GFC_INTEGER_8 *, + GFC_INTEGER_4, GFC_INTEGER_4); +export_proto(eoshift1_8_char); + +void +eoshift1_8_char (gfc_array_char *ret, + GFC_INTEGER_4 ret_length __attribute__((unused)), + const gfc_array_char *array, const gfc_array_i8 *h, + const char *pbound, const GFC_INTEGER_8 *pwhich, + GFC_INTEGER_4 array_length, + GFC_INTEGER_4 bound_length + __attribute__((unused))) +{ + eoshift1 (ret, array, h, pbound, pwhich, array_length, ' '); +} |