c/7010: Bug in 3.1 with inline memcpy

Jakub Jelinek jakub@redhat.com
Thu Jun 13 09:13:00 GMT 2002


On Thu, Jun 13, 2002 at 06:05:55PM +0200, Jan Hubicka wrote:
> > #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?

I think the testcase would be useful on branch too, just
it shouldn't use string.h but whatever simplified code reproduces this
(as with string.h it depends on what exact libc you're using etc.).

	Jakub



More information about the Gcc-patches mailing list