summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-03 21:05:14 +0000
committerfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-03 21:05:14 +0000
commitf62816ef30e463eeb91b454cbee66d412fc1cb04 (patch)
tree6af7d5c4118c4c4b7db6fce6a67c9a5054967ba7 /libgfortran
parent6e4355c2ac20048cead81b6266eae5c4005e4dbb (diff)
downloadgcc-f62816ef30e463eeb91b454cbee66d412fc1cb04.tar.gz
PR fortran/31304
* fortran/gfortran.h (gfc_charlen_int_kind): New prototype. * fortran/trans-types.c (gfc_charlen_int_kind): New variable. (gfc_init_types): Define gfc_charlen_int_kind. * fortran/trans.h (gfor_fndecl_string_repeat): Remove prototype. * fortran/trans-decl.c (gfor_fndecl_string_repeat): Delete. (gfc_build_intrinsic_function_decls): Don't set gfor_fndecl_string_repeat. * fortran/trans-intrinsic.c (gfc_conv_intrinsic_repeat): Rewrite so that we don't have to call a library function. * fortran/simplify.c (gfc_simplify_repeat): Perform the necessary checks on the NCOPIES argument, and work with arbitrary size arguments. * intrinsics/string_intrinsics.c (string_repeat): Remove. * gfortran.dg/repeat_2.f90: New test. * gfortran.dg/repeat_3.f90: New test. * gfortran.dg/repeat_4.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123481 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog5
-rw-r--r--libgfortran/intrinsics/string_intrinsics.c20
2 files changed, 5 insertions, 20 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index d360b6cb0c5..87ad838829e 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/31304
+ intrinsics/string_intrinsics.c (string_repeat): Remove.
+
2007-04-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/31052
diff --git a/libgfortran/intrinsics/string_intrinsics.c b/libgfortran/intrinsics/string_intrinsics.c
index 86ef9d42604..1a4b1593270 100644
--- a/libgfortran/intrinsics/string_intrinsics.c
+++ b/libgfortran/intrinsics/string_intrinsics.c
@@ -73,9 +73,6 @@ export_proto(string_verify);
extern void string_trim (GFC_INTEGER_4 *, void **, GFC_INTEGER_4, const char *);
export_proto(string_trim);
-extern void string_repeat (char *, GFC_INTEGER_4, const char *, GFC_INTEGER_4);
-export_proto(string_repeat);
-
/* Strings of unequal length are extended with pad characters. */
GFC_INTEGER_4
@@ -352,20 +349,3 @@ string_verify (GFC_INTEGER_4 slen, const char * str, GFC_INTEGER_4 setlen,
return 0;
}
-
-
-/* Concatenate several copies of a string. */
-
-void
-string_repeat (char * dest, GFC_INTEGER_4 slen,
- const char * src, GFC_INTEGER_4 ncopies)
-{
- int i;
-
- /* We don't need to check that ncopies is non-negative here, because
- the front-end already generates code for that check. */
- for (i = 0; i < ncopies; i++)
- {
- memmove (dest + (i * slen), src, slen);
- }
-}