summaryrefslogtreecommitdiff
path: root/libgfortran/generated
diff options
context:
space:
mode:
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-28 21:11:39 +0000
committerfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-28 21:11:39 +0000
commit329f13ad8e6dc4f4d79b9fab510e7aef577518d3 (patch)
treea956a38d25628c3640e2911e48de624e53210afa /libgfortran/generated
parent69eee21db577b8a270fae4da3cc5f8686ca93057 (diff)
downloadgcc-329f13ad8e6dc4f4d79b9fab510e7aef577518d3.tar.gz
PR fortran/36319
* intrinsic.c (gfc_convert_chartype): Don't mark conversion function as pure. * trans-array.c (gfc_trans_array_ctor_element): Divide element size by the size of one character to obtain length. * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when appropriate. (gfc_resolve_eoshift): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification. (gfc_conv_intrinsic_fdate): Minor beautification. (gfc_conv_intrinsic_ttynam): Minor beautification. (gfc_conv_intrinsic_minmax_char): Allow all character kinds. (size_of_string_in_bytes): New function. (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for character expressions. (gfc_conv_intrinsic_sizeof): Likewise. (gfc_conv_intrinsic_array_transfer): Likewise. (gfc_conv_intrinsic_trim): Allow all character kinds. Minor beautification. (gfc_conv_intrinsic_repeat): Fix comment typo. * simplify.c (gfc_convert_char_constant): Take care of conversion of array constructors. * intrinsics/string_intrinsics_inc.c (string_index): Return correct value for zero-length substring. * intrinsics/cshift0.c: Add _char4 variant. * intrinsics/eoshift0.c (eoshift0): Allow filler to be a pattern wider than a single byte. Add _char4 variant and use above functionality. * intrinsics/eoshift2.c (eoshift2): Likewise. * m4/eoshift1.m4: Likewise. * m4/eoshift3.m4: Likewise. * m4/cshift1.m4: Add _char4 variants. * gfortran.map (GFORTRAN_1.1): Add _gfortran_cshift0_1_char4, _gfortran_cshift0_2_char4, _gfortran_cshift0_4_char4, _gfortran_cshift0_8_char4, _gfortran_cshift1_16_char4, _gfortran_cshift1_4_char4, _gfortran_cshift1_8_char4, _gfortran_eoshift0_1_char4, _gfortran_eoshift0_2_char4, _gfortran_eoshift0_4_char4, _gfortran_eoshift0_8_char4, _gfortran_eoshift1_16_char4, _gfortran_eoshift1_4_char4, _gfortran_eoshift1_8_char4, _gfortran_eoshift2_1_char4, _gfortran_eoshift2_2_char4, _gfortran_eoshift2_4_char4, _gfortran_eoshift2_8_char4, _gfortran_eoshift3_16_char4, _gfortran_eoshift3_4_char4 and _gfortran_eoshift3_8_char4. * generated/eoshift3_4.c: Regenerate. * generated/eoshift1_8.c: Regenerate. * generated/eoshift1_16.c: Regenerate. * generated/cshift1_4.c: Regenerate. * generated/eoshift1_4.c: Regenerate. * generated/eoshift3_8.c: Regenerate. * generated/eoshift3_16.c: Regenerate. * generated/cshift1_8.c: Regenerate. * generated/cshift1_16.c: Regenerate. * gfortran.dg/widechar_5.f90: New file. * gfortran.dg/widechar_6.f90: New file. * gfortran.dg/widechar_7.f90: New file. * gfortran.dg/widechar_intrinsics_5.f90: Uncomment the lines testing the SPREAD intrinsic. * gfortran.dg/widechar_intrinsics_6.f90: New file. * gfortran.dg/widechar_intrinsics_7.f90: New file. * gfortran.dg/widechar_intrinsics_8.f90: New file. * gfortran.dg/widechar_intrinsics_9.f90: New file. * gfortran.dg/widechar_intrinsics_10.f90: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136129 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/generated')
-rw-r--r--libgfortran/generated/cshift1_16.c21
-rw-r--r--libgfortran/generated/cshift1_4.c21
-rw-r--r--libgfortran/generated/cshift1_8.c21
-rw-r--r--libgfortran/generated/eoshift1_16.c42
-rw-r--r--libgfortran/generated/eoshift1_4.c42
-rw-r--r--libgfortran/generated/eoshift1_8.c42
-rw-r--r--libgfortran/generated/eoshift3_16.c42
-rw-r--r--libgfortran/generated/eoshift3_4.c42
-rw-r--r--libgfortran/generated/eoshift3_8.c42
9 files changed, 291 insertions, 24 deletions
diff --git a/libgfortran/generated/cshift1_16.c b/libgfortran/generated/cshift1_16.c
index a29bf79ce72..2943c3ed86d 100644
--- a/libgfortran/generated/cshift1_16.c
+++ b/libgfortran/generated/cshift1_16.c
@@ -212,6 +212,7 @@ cshift1_16 (gfc_array_char * const restrict ret,
cshift1 (ret, array, h, pwhich, GFC_DESCRIPTOR_SIZE (array));
}
+
void cshift1_16_char (gfc_array_char * const restrict ret,
GFC_INTEGER_4,
const gfc_array_char * const restrict array,
@@ -231,4 +232,24 @@ cshift1_16_char (gfc_array_char * const restrict ret,
cshift1 (ret, array, h, pwhich, array_length);
}
+
+void cshift1_16_char4 (gfc_array_char * const restrict ret,
+ GFC_INTEGER_4,
+ const gfc_array_char * const restrict array,
+ const gfc_array_i16 * const restrict h,
+ const GFC_INTEGER_16 * const restrict pwhich,
+ GFC_INTEGER_4);
+export_proto(cshift1_16_char4);
+
+void
+cshift1_16_char4 (gfc_array_char * const restrict ret,
+ GFC_INTEGER_4 ret_length __attribute__((unused)),
+ const gfc_array_char * const restrict array,
+ const gfc_array_i16 * const restrict h,
+ const GFC_INTEGER_16 * const restrict pwhich,
+ GFC_INTEGER_4 array_length)
+{
+ cshift1 (ret, array, h, pwhich, array_length * sizeof (gfc_char4_t));
+}
+
#endif
diff --git a/libgfortran/generated/cshift1_4.c b/libgfortran/generated/cshift1_4.c
index 0525873b563..3f4f9e0bf25 100644
--- a/libgfortran/generated/cshift1_4.c
+++ b/libgfortran/generated/cshift1_4.c
@@ -212,6 +212,7 @@ cshift1_4 (gfc_array_char * const restrict ret,
cshift1 (ret, array, h, pwhich, GFC_DESCRIPTOR_SIZE (array));
}
+
void cshift1_4_char (gfc_array_char * const restrict ret,
GFC_INTEGER_4,
const gfc_array_char * const restrict array,
@@ -231,4 +232,24 @@ cshift1_4_char (gfc_array_char * const restrict ret,
cshift1 (ret, array, h, pwhich, array_length);
}
+
+void cshift1_4_char4 (gfc_array_char * const restrict ret,
+ GFC_INTEGER_4,
+ const gfc_array_char * const restrict array,
+ const gfc_array_i4 * const restrict h,
+ const GFC_INTEGER_4 * const restrict pwhich,
+ GFC_INTEGER_4);
+export_proto(cshift1_4_char4);
+
+void
+cshift1_4_char4 (gfc_array_char * const restrict ret,
+ GFC_INTEGER_4 ret_length __attribute__((unused)),
+ const gfc_array_char * const restrict array,
+ const gfc_array_i4 * const restrict h,
+ const GFC_INTEGER_4 * const restrict pwhich,
+ GFC_INTEGER_4 array_length)
+{
+ cshift1 (ret, array, h, pwhich, array_length * sizeof (gfc_char4_t));
+}
+
#endif
diff --git a/libgfortran/generated/cshift1_8.c b/libgfortran/generated/cshift1_8.c
index 624b662cea7..4d246e54d95 100644
--- a/libgfortran/generated/cshift1_8.c
+++ b/libgfortran/generated/cshift1_8.c
@@ -212,6 +212,7 @@ cshift1_8 (gfc_array_char * const restrict ret,
cshift1 (ret, array, h, pwhich, GFC_DESCRIPTOR_SIZE (array));
}
+
void cshift1_8_char (gfc_array_char * const restrict ret,
GFC_INTEGER_4,
const gfc_array_char * const restrict array,
@@ -231,4 +232,24 @@ cshift1_8_char (gfc_array_char * const restrict ret,
cshift1 (ret, array, h, pwhich, array_length);
}
+
+void cshift1_8_char4 (gfc_array_char * const restrict ret,
+ GFC_INTEGER_4,
+ const gfc_array_char * const restrict array,
+ const gfc_array_i8 * const restrict h,
+ const GFC_INTEGER_8 * const restrict pwhich,
+ GFC_INTEGER_4);
+export_proto(cshift1_8_char4);
+
+void
+cshift1_8_char4 (gfc_array_char * const restrict ret,
+ GFC_INTEGER_4 ret_length __attribute__((unused)),
+ const gfc_array_char * const restrict array,
+ const gfc_array_i8 * const restrict h,
+ const GFC_INTEGER_8 * const restrict pwhich,
+ GFC_INTEGER_4 array_length)
+{
+ cshift1 (ret, array, h, pwhich, array_length * sizeof (gfc_char4_t));
+}
+
#endif
diff --git a/libgfortran/generated/eoshift1_16.c b/libgfortran/generated/eoshift1_16.c
index e16db209e3d..63b75bdbd6b 100644
--- a/libgfortran/generated/eoshift1_16.c
+++ b/libgfortran/generated/eoshift1_16.c
@@ -42,7 +42,7 @@ eoshift1 (gfc_array_char * const restrict ret,
const gfc_array_i16 * const restrict h,
const char * const restrict pbound,
const GFC_INTEGER_16 * const restrict pwhich,
- index_type size, char filler)
+ index_type size, const char * filler, index_type filler_len)
{
/* r.* indicates the return array. */
index_type rstride[GFC_MAX_DIMENSIONS];
@@ -183,7 +183,14 @@ eoshift1 (gfc_array_char * const restrict ret,
else
while (n--)
{
- memset (dest, filler, size);
+ index_type i;
+
+ if (filler_len == 1)
+ memset (dest, filler[0], size);
+ else
+ for (i = 0; i < size; i += filler_len)
+ memcpy (&dest[i], filler, filler_len);
+
dest += roffset;
}
@@ -234,9 +241,11 @@ eoshift1_16 (gfc_array_char * const restrict ret,
const char * const restrict pbound,
const GFC_INTEGER_16 * const restrict pwhich)
{
- eoshift1 (ret, array, h, pbound, pwhich, GFC_DESCRIPTOR_SIZE (array), 0);
+ eoshift1 (ret, array, h, pbound, pwhich, GFC_DESCRIPTOR_SIZE (array),
+ "\0", 1);
}
+
void eoshift1_16_char (gfc_array_char * const restrict,
GFC_INTEGER_4,
const gfc_array_char * const restrict,
@@ -256,7 +265,32 @@ eoshift1_16_char (gfc_array_char * const restrict ret,
GFC_INTEGER_4 array_length,
GFC_INTEGER_4 bound_length __attribute__((unused)))
{
- eoshift1 (ret, array, h, pbound, pwhich, array_length, ' ');
+ eoshift1 (ret, array, h, pbound, pwhich, array_length, " ", 1);
+}
+
+
+void eoshift1_16_char4 (gfc_array_char * const restrict,
+ GFC_INTEGER_4,
+ const gfc_array_char * const restrict,
+ const gfc_array_i16 * const restrict,
+ const char * const restrict,
+ const GFC_INTEGER_16 * const restrict,
+ GFC_INTEGER_4, GFC_INTEGER_4);
+export_proto(eoshift1_16_char4);
+
+void
+eoshift1_16_char4 (gfc_array_char * const restrict ret,
+ GFC_INTEGER_4 ret_length __attribute__((unused)),
+ const gfc_array_char * const restrict array,
+ const gfc_array_i16 * const restrict h,
+ const char * const restrict pbound,
+ const GFC_INTEGER_16 * const restrict pwhich,
+ GFC_INTEGER_4 array_length,
+ GFC_INTEGER_4 bound_length __attribute__((unused)))
+{
+ static const gfc_char4_t space = (unsigned char) ' ';
+ eoshift1 (ret, array, h, pbound, pwhich, array_length * sizeof (gfc_char4_t),
+ (const char *) &space, sizeof (gfc_char4_t));
}
#endif
diff --git a/libgfortran/generated/eoshift1_4.c b/libgfortran/generated/eoshift1_4.c
index 11cc71fc917..58ce7e9f5dd 100644
--- a/libgfortran/generated/eoshift1_4.c
+++ b/libgfortran/generated/eoshift1_4.c
@@ -42,7 +42,7 @@ eoshift1 (gfc_array_char * const restrict ret,
const gfc_array_i4 * const restrict h,
const char * const restrict pbound,
const GFC_INTEGER_4 * const restrict pwhich,
- index_type size, char filler)
+ index_type size, const char * filler, index_type filler_len)
{
/* r.* indicates the return array. */
index_type rstride[GFC_MAX_DIMENSIONS];
@@ -183,7 +183,14 @@ eoshift1 (gfc_array_char * const restrict ret,
else
while (n--)
{
- memset (dest, filler, size);
+ index_type i;
+
+ if (filler_len == 1)
+ memset (dest, filler[0], size);
+ else
+ for (i = 0; i < size; i += filler_len)
+ memcpy (&dest[i], filler, filler_len);
+
dest += roffset;
}
@@ -234,9 +241,11 @@ eoshift1_4 (gfc_array_char * const restrict ret,
const char * const restrict pbound,
const GFC_INTEGER_4 * const restrict pwhich)
{
- eoshift1 (ret, array, h, pbound, pwhich, GFC_DESCRIPTOR_SIZE (array), 0);
+ eoshift1 (ret, array, h, pbound, pwhich, GFC_DESCRIPTOR_SIZE (array),
+ "\0", 1);
}
+
void eoshift1_4_char (gfc_array_char * const restrict,
GFC_INTEGER_4,
const gfc_array_char * const restrict,
@@ -256,7 +265,32 @@ eoshift1_4_char (gfc_array_char * const restrict ret,
GFC_INTEGER_4 array_length,
GFC_INTEGER_4 bound_length __attribute__((unused)))
{
- eoshift1 (ret, array, h, pbound, pwhich, array_length, ' ');
+ eoshift1 (ret, array, h, pbound, pwhich, array_length, " ", 1);
+}
+
+
+void eoshift1_4_char4 (gfc_array_char * const restrict,
+ GFC_INTEGER_4,
+ const gfc_array_char * const restrict,
+ const gfc_array_i4 * const restrict,
+ const char * const restrict,
+ const GFC_INTEGER_4 * const restrict,
+ GFC_INTEGER_4, GFC_INTEGER_4);
+export_proto(eoshift1_4_char4);
+
+void
+eoshift1_4_char4 (gfc_array_char * const restrict ret,
+ GFC_INTEGER_4 ret_length __attribute__((unused)),
+ const gfc_array_char * const restrict array,
+ const gfc_array_i4 * const restrict h,
+ const char * const restrict pbound,
+ const GFC_INTEGER_4 * const restrict pwhich,
+ GFC_INTEGER_4 array_length,
+ GFC_INTEGER_4 bound_length __attribute__((unused)))
+{
+ static const gfc_char4_t space = (unsigned char) ' ';
+ eoshift1 (ret, array, h, pbound, pwhich, array_length * sizeof (gfc_char4_t),
+ (const char *) &space, sizeof (gfc_char4_t));
}
#endif
diff --git a/libgfortran/generated/eoshift1_8.c b/libgfortran/generated/eoshift1_8.c
index 4b7d0e04f31..0e9c2f1442a 100644
--- a/libgfortran/generated/eoshift1_8.c
+++ b/libgfortran/generated/eoshift1_8.c
@@ -42,7 +42,7 @@ eoshift1 (gfc_array_char * const restrict ret,
const gfc_array_i8 * const restrict h,
const char * const restrict pbound,
const GFC_INTEGER_8 * const restrict pwhich,
- index_type size, char filler)
+ index_type size, const char * filler, index_type filler_len)
{
/* r.* indicates the return array. */
index_type rstride[GFC_MAX_DIMENSIONS];
@@ -183,7 +183,14 @@ eoshift1 (gfc_array_char * const restrict ret,
else
while (n--)
{
- memset (dest, filler, size);
+ index_type i;
+
+ if (filler_len == 1)
+ memset (dest, filler[0], size);
+ else
+ for (i = 0; i < size; i += filler_len)
+ memcpy (&dest[i], filler, filler_len);
+
dest += roffset;
}
@@ -234,9 +241,11 @@ eoshift1_8 (gfc_array_char * const restrict ret,
const char * const restrict pbound,
const GFC_INTEGER_8 * const restrict pwhich)
{
- eoshift1 (ret, array, h, pbound, pwhich, GFC_DESCRIPTOR_SIZE (array), 0);
+ eoshift1 (ret, array, h, pbound, pwhich, GFC_DESCRIPTOR_SIZE (array),
+ "\0", 1);
}
+
void eoshift1_8_char (gfc_array_char * const restrict,
GFC_INTEGER_4,
const gfc_array_char * const restrict,
@@ -256,7 +265,32 @@ eoshift1_8_char (gfc_array_char * const restrict ret,
GFC_INTEGER_4 array_length,
GFC_INTEGER_4 bound_length __attribute__((unused)))
{
- eoshift1 (ret, array, h, pbound, pwhich, array_length, ' ');
+ eoshift1 (ret, array, h, pbound, pwhich, array_length, " ", 1);
+}
+
+
+void eoshift1_8_char4 (gfc_array_char * const restrict,
+ GFC_INTEGER_4,
+ const gfc_array_char * const restrict,
+ const gfc_array_i8 * const restrict,
+ const char * const restrict,
+ const GFC_INTEGER_8 * const restrict,
+ GFC_INTEGER_4, GFC_INTEGER_4);
+export_proto(eoshift1_8_char4);
+
+void
+eoshift1_8_char4 (gfc_array_char * const restrict ret,
+ GFC_INTEGER_4 ret_length __attribute__((unused)),
+ const gfc_array_char * const restrict array,
+ const gfc_array_i8 * const restrict h,
+ const char * const restrict pbound,
+ const GFC_INTEGER_8 * const restrict pwhich,
+ GFC_INTEGER_4 array_length,
+ GFC_INTEGER_4 bound_length __attribute__((unused)))
+{
+ static const gfc_char4_t space = (unsigned char) ' ';
+ eoshift1 (ret, array, h, pbound, pwhich, array_length * sizeof (gfc_char4_t),
+ (const char *) &space, sizeof (gfc_char4_t));
}
#endif
diff --git a/libgfortran/generated/eoshift3_16.c b/libgfortran/generated/eoshift3_16.c
index 1dda668d47b..214f3783d4f 100644
--- a/libgfortran/generated/eoshift3_16.c
+++ b/libgfortran/generated/eoshift3_16.c
@@ -42,7 +42,7 @@ eoshift3 (gfc_array_char * const restrict ret,
const gfc_array_i16 * const restrict h,
const gfc_array_char * const restrict bound,
const GFC_INTEGER_16 * const restrict pwhich,
- index_type size, char filler)
+ index_type size, const char * filler, index_type filler_len)
{
/* r.* indicates the return array. */
index_type rstride[GFC_MAX_DIMENSIONS];
@@ -198,7 +198,14 @@ eoshift3 (gfc_array_char * const restrict ret,
else
while (n--)
{
- memset (dest, filler, size);
+ index_type i;
+
+ if (filler_len == 1)
+ memset (dest, filler[0], size);
+ else
+ for (i = 0; i < size; i += filler_len)
+ memcpy (&dest[i], filler, filler_len);
+
dest += roffset;
}
@@ -253,9 +260,11 @@ eoshift3_16 (gfc_array_char * const restrict ret,
const gfc_array_char * const restrict bound,
const GFC_INTEGER_16 * const restrict pwhich)
{
- eoshift3 (ret, array, h, bound, pwhich, GFC_DESCRIPTOR_SIZE (array), 0);
+ eoshift3 (ret, array, h, bound, pwhich, GFC_DESCRIPTOR_SIZE (array),
+ "\0", 1);
}
+
extern void eoshift3_16_char (gfc_array_char * const restrict,
GFC_INTEGER_4,
const gfc_array_char * const restrict,
@@ -275,7 +284,32 @@ eoshift3_16_char (gfc_array_char * const restrict ret,
GFC_INTEGER_4 array_length,
GFC_INTEGER_4 bound_length __attribute__((unused)))
{
- eoshift3 (ret, array, h, bound, pwhich, array_length, ' ');
+ eoshift3 (ret, array, h, bound, pwhich, array_length, " ", 1);
+}
+
+
+extern void eoshift3_16_char4 (gfc_array_char * const restrict,
+ GFC_INTEGER_4,
+ const gfc_array_char * const restrict,
+ const gfc_array_i16 * const restrict,
+ const gfc_array_char * const restrict,
+ const GFC_INTEGER_16 * const restrict,
+ GFC_INTEGER_4, GFC_INTEGER_4);
+export_proto(eoshift3_16_char4);
+
+void
+eoshift3_16_char4 (gfc_array_char * const restrict ret,
+ GFC_INTEGER_4 ret_length __attribute__((unused)),
+ const gfc_array_char * const restrict array,
+ const gfc_array_i16 * const restrict h,
+ const gfc_array_char * const restrict bound,
+ const GFC_INTEGER_16 * const restrict pwhich,
+ GFC_INTEGER_4 array_length,
+ GFC_INTEGER_4 bound_length __attribute__((unused)))
+{
+ static const gfc_char4_t space = (unsigned char) ' ';
+ eoshift3 (ret, array, h, bound, pwhich, array_length * sizeof (gfc_char4_t),
+ (const char *) &space, sizeof (gfc_char4_t));
}
#endif
diff --git a/libgfortran/generated/eoshift3_4.c b/libgfortran/generated/eoshift3_4.c
index aa46f7c5a10..e96ef2504b0 100644
--- a/libgfortran/generated/eoshift3_4.c
+++ b/libgfortran/generated/eoshift3_4.c
@@ -42,7 +42,7 @@ eoshift3 (gfc_array_char * const restrict ret,
const gfc_array_i4 * const restrict h,
const gfc_array_char * const restrict bound,
const GFC_INTEGER_4 * const restrict pwhich,
- index_type size, char filler)
+ index_type size, const char * filler, index_type filler_len)
{
/* r.* indicates the return array. */
index_type rstride[GFC_MAX_DIMENSIONS];
@@ -198,7 +198,14 @@ eoshift3 (gfc_array_char * const restrict ret,
else
while (n--)
{
- memset (dest, filler, size);
+ index_type i;
+
+ if (filler_len == 1)
+ memset (dest, filler[0], size);
+ else
+ for (i = 0; i < size; i += filler_len)
+ memcpy (&dest[i], filler, filler_len);
+
dest += roffset;
}
@@ -253,9 +260,11 @@ eoshift3_4 (gfc_array_char * const restrict ret,
const gfc_array_char * const restrict bound,
const GFC_INTEGER_4 * const restrict pwhich)
{
- eoshift3 (ret, array, h, bound, pwhich, GFC_DESCRIPTOR_SIZE (array), 0);
+ eoshift3 (ret, array, h, bound, pwhich, GFC_DESCRIPTOR_SIZE (array),
+ "\0", 1);
}
+
extern void eoshift3_4_char (gfc_array_char * const restrict,
GFC_INTEGER_4,
const gfc_array_char * const restrict,
@@ -275,7 +284,32 @@ eoshift3_4_char (gfc_array_char * const restrict ret,
GFC_INTEGER_4 array_length,
GFC_INTEGER_4 bound_length __attribute__((unused)))
{
- eoshift3 (ret, array, h, bound, pwhich, array_length, ' ');
+ eoshift3 (ret, array, h, bound, pwhich, array_length, " ", 1);
+}
+
+
+extern void eoshift3_4_char4 (gfc_array_char * const restrict,
+ GFC_INTEGER_4,
+ const gfc_array_char * const restrict,
+ const gfc_array_i4 * const restrict,
+ const gfc_array_char * const restrict,
+ const GFC_INTEGER_4 * const restrict,
+ GFC_INTEGER_4, GFC_INTEGER_4);
+export_proto(eoshift3_4_char4);
+
+void
+eoshift3_4_char4 (gfc_array_char * const restrict ret,
+ GFC_INTEGER_4 ret_length __attribute__((unused)),
+ const gfc_array_char * const restrict array,
+ const gfc_array_i4 * const restrict h,
+ const gfc_array_char * const restrict bound,
+ const GFC_INTEGER_4 * const restrict pwhich,
+ GFC_INTEGER_4 array_length,
+ GFC_INTEGER_4 bound_length __attribute__((unused)))
+{
+ static const gfc_char4_t space = (unsigned char) ' ';
+ eoshift3 (ret, array, h, bound, pwhich, array_length * sizeof (gfc_char4_t),
+ (const char *) &space, sizeof (gfc_char4_t));
}
#endif
diff --git a/libgfortran/generated/eoshift3_8.c b/libgfortran/generated/eoshift3_8.c
index 04e81b8eb39..dc39b94eb97 100644
--- a/libgfortran/generated/eoshift3_8.c
+++ b/libgfortran/generated/eoshift3_8.c
@@ -42,7 +42,7 @@ eoshift3 (gfc_array_char * const restrict ret,
const gfc_array_i8 * const restrict h,
const gfc_array_char * const restrict bound,
const GFC_INTEGER_8 * const restrict pwhich,
- index_type size, char filler)
+ index_type size, const char * filler, index_type filler_len)
{
/* r.* indicates the return array. */
index_type rstride[GFC_MAX_DIMENSIONS];
@@ -198,7 +198,14 @@ eoshift3 (gfc_array_char * const restrict ret,
else
while (n--)
{
- memset (dest, filler, size);
+ index_type i;
+
+ if (filler_len == 1)
+ memset (dest, filler[0], size);
+ else
+ for (i = 0; i < size; i += filler_len)
+ memcpy (&dest[i], filler, filler_len);
+
dest += roffset;
}
@@ -253,9 +260,11 @@ eoshift3_8 (gfc_array_char * const restrict ret,
const gfc_array_char * const restrict bound,
const GFC_INTEGER_8 * const restrict pwhich)
{
- eoshift3 (ret, array, h, bound, pwhich, GFC_DESCRIPTOR_SIZE (array), 0);
+ eoshift3 (ret, array, h, bound, pwhich, GFC_DESCRIPTOR_SIZE (array),
+ "\0", 1);
}
+
extern void eoshift3_8_char (gfc_array_char * const restrict,
GFC_INTEGER_4,
const gfc_array_char * const restrict,
@@ -275,7 +284,32 @@ eoshift3_8_char (gfc_array_char * const restrict ret,
GFC_INTEGER_4 array_length,
GFC_INTEGER_4 bound_length __attribute__((unused)))
{
- eoshift3 (ret, array, h, bound, pwhich, array_length, ' ');
+ eoshift3 (ret, array, h, bound, pwhich, array_length, " ", 1);
+}
+
+
+extern void eoshift3_8_char4 (gfc_array_char * const restrict,
+ GFC_INTEGER_4,
+ const gfc_array_char * const restrict,
+ const gfc_array_i8 * const restrict,
+ const gfc_array_char * const restrict,
+ const GFC_INTEGER_8 * const restrict,
+ GFC_INTEGER_4, GFC_INTEGER_4);
+export_proto(eoshift3_8_char4);
+
+void
+eoshift3_8_char4 (gfc_array_char * const restrict ret,
+ GFC_INTEGER_4 ret_length __attribute__((unused)),
+ const gfc_array_char * const restrict array,
+ const gfc_array_i8 * const restrict h,
+ const gfc_array_char * const restrict bound,
+ const GFC_INTEGER_8 * const restrict pwhich,
+ GFC_INTEGER_4 array_length,
+ GFC_INTEGER_4 bound_length __attribute__((unused)))
+{
+ static const gfc_char4_t space = (unsigned char) ' ';
+ eoshift3 (ret, array, h, bound, pwhich, array_length * sizeof (gfc_char4_t),
+ (const char *) &space, sizeof (gfc_char4_t));
}
#endif