------- Comment #11 from ubizjak at gmail dot com  2007-09-20 11:58 -------
I hope that following testcase can be of some use to somebody...

--cut here--
void __attribute__((noinline))
inflate_fast (unsigned char *from, unsigned char *out, unsigned int len)
{
  while (len > 2)
    {
      *++(out) = *++(from);
      *++(out) = *++(from);
      *++(out) = *++(from);
      len -= 3;
    }

  return;
}

int main()
{
  unsigned int len = 13;

  unsigned char x[13] = "Hello there! ...Hello there! ...Hello there! ...";
  unsigned char y[13] = " ";

  inflate_fast (x, y, len);

  printf ("%s\n", y);
  return 0;
}
--cut here--

This testcase produces movdqa with 1byte offset, but I'm not able to trigger
segfault with it, although it produces asm code as in comment #18.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32893

Reply via email to