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

--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-02-02 
22:22:53 UTC ---
Here is a wrong code with this bug:
int f(void) __attribute__((noclone, noinline));
int g(void) __attribute__((noclone, noinline));
void h(int*) __attribute__((noclone, noinline));
int t = 0;
int a[2];


void h(int *a1)
{
  if(a1 != a+(1-t))
    __builtin_abort();
}
int f(void)
{
  asm("");
  return 1;
}
int g(void)
{
  asm("");
  return 0;
}
int main(void)
{
  int *cur = a;
  while(t<2)
  {
    __SIZE_TYPE__ tt = cur == a;
    int *next = a+tt;
    h(next);
    if(f())
    {
      if (g())
        continue;
      cur = next;
    }
    t++;
  }
}

Reply via email to