[Bug middle-end/38212] restrict implementation causes wrong-code

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Nov 21 13:42:00 GMT 2008



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-11-21 13:41 -------
Shorter testcase:

int __attribute__((noinline))
foo (int *__restrict p, int i)
{
  int *__restrict q = p + i;
  int v = *q;
  *p = 1;
  return v + *q;
}
extern void abort (void);
int main()
{
  int i = 0;
  if (foo (&i, 0) != 1)
    abort ();
  return 0;
}


-- 


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



More information about the Gcc-bugs mailing list