This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: add h8sx support to h8300
On Jul 7, 2004, Richard Henderson <rth@redhat.com> wrote:
> On Wed, Jul 07, 2004 at 10:06:38PM -0300, Alexandre Oliva wrote:
>> How's this patchlet?
> Ok.
Rats, I'd simplified the decay of stpcpy to strcpy, but I failed to
realize that, if the builtin expansion failed, we'd still call
stpcpy. This patch reverts that bit. I'm checking it in. Sorry
about the breakage, and thanks for pointing it out.
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* builtins.c (expand_builtin_stpcpy): Un-simplify decay of stpcpy
to strcpy.
Index: gcc/builtins.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/builtins.c,v
retrieving revision 1.348
diff -u -p -r1.348 builtins.c
--- gcc/builtins.c 8 Jul 2004 03:40:29 -0000 1.348
+++ gcc/builtins.c 8 Jul 2004 17:06:04 -0000
@@ -3090,7 +3090,14 @@ expand_builtin_stpcpy (tree arglist, rtx
{
/* 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;
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}