diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2004-07-08 17:16:24 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2004-07-08 17:16:24 +0000 |
commit | ad4319ec12a27512566edfe9364ea59f63d397bc (patch) | |
tree | 9d9559db2c68cad406773d425357e16f885b2824 /gcc | |
parent | 652eb7440cd038df2aeb8226189a9d4cf8578108 (diff) | |
download | gcc-ad4319ec12a27512566edfe9364ea59f63d397bc.zip gcc-ad4319ec12a27512566edfe9364ea59f63d397bc.tar.gz gcc-ad4319ec12a27512566edfe9364ea59f63d397bc.tar.bz2 |
builtins.c (expand_builtin_stpcpy): Un-simplify decay of stpcpy to strcpy.
* builtins.c (expand_builtin_stpcpy): Un-simplify decay of stpcpy
to strcpy.
From-SVN: r84301
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/builtins.c | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e2cdc66..1456ae9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2004-07-08 Alexandre Oliva <aoliva@redhat.com> + * builtins.c (expand_builtin_stpcpy): Un-simplify decay of stpcpy + to strcpy. + * expr.h (FUNCTION_ARG_PARTIAL_NREGS): Default to 0. (FUNCTION_ARG_PASS_BY_REFERENCE): Likewise. (FUNCTION_ARG_CALLEE_COPIES): Likewise. diff --git a/gcc/builtins.c b/gcc/builtins.c index 72cf798..9bcef91 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -3090,7 +3090,14 @@ expand_builtin_stpcpy (tree arglist, rtx target, enum machine_mode mode) { /* If return value is ignored, transform stpcpy into strcpy. */ if (target == const0_rtx) - return expand_builtin_strcpy (arglist, target, mode); + { + tree fn = implicit_built_in_decls[BUILT_IN_STRCPY]; + if (!fn) + return 0; + + return expand_expr (build_function_call_expr (fn, arglist), + target, mode, EXPAND_NORMAL); + } if (!validate_arglist (arglist, POINTER_TYPE, POINTER_TYPE, VOID_TYPE)) return 0; |