This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: c/7010: Bug in 3.1 with inline memcpy
- From: Jan Hubicka <jh at suse dot cz>
- To: Martin Kahlert <martin dot kahlert at infineon dot com>,gcc-patches at gcc dot gnu dot org, rth at cygnus dot com, aj at suse dot de
- Cc: gcc-gnats at gcc dot gnu dot org
- Date: Thu, 13 Jun 2002 18:05:55 +0200
- Subject: Re: c/7010: Bug in 3.1 with inline memcpy
- References: <200206130806.g5D86gL26548@keksy.muc.infineon.com>
> #include <string.h>
>
> int main()
> {
> char dst[16];
> char src[16];
> int tocopy = 5;
>
> memcpy (dst+5, src, tocopy);
>
> return 0;
> }
Oh no, another pasto in my code :(
I am just proffreading both functions to catch similar bugs, if they
exists.
Bootstrapped/regtested branch, OK for mainline/branch?
Ok to add testcase into mainline testsuite?
Thu Jun 13 18:03:55 CEST 2002 Jan Hubicka <jh@suse.cz>
* i386.c (ix86_expand_movstr): Fix pasto.
Index: i386.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.c,v
retrieving revision 1.423
diff -c -3 -p -r1.423 i386.c
*** i386.c 12 Jun 2002 14:51:07 -0000 1.423
--- i386.c 13 Jun 2002 16:03:44 -0000
*************** ix86_expand_movstr (dst, src, count_exp,
*** 9913,9919 ****
if (count == 0 && align < desired_alignment)
{
label = gen_label_rtx ();
! emit_cmp_and_jump_insns (countreg, GEN_INT (UNITS_PER_WORD - 1),
LEU, 0, counter_mode, 1, label);
}
if (align <= 1)
--- 9913,9919 ----
if (count == 0 && align < desired_alignment)
{
label = gen_label_rtx ();
! emit_cmp_and_jump_insns (countreg, GEN_INT (desired_alignment - 1),
LEU, 0, counter_mode, 1, label);
}
if (align <= 1)