------- Comment #1 from jakub at gcc dot gnu dot org  2010-02-12 14:05 -------
Slightly smaller testcase:
static void __attribute__((noinline))
foo (const char *x, long long y)
{
  asm volatile ("" : : "r" (x), "r" ((int) y), "r" (0) : "memory");
}

typedef struct S
{
  struct S *n;
  int v;
} *P;

P
bar (P c, int v, P e)
{
  register int si asm ("esi"), di asm ("edi"), bx asm ("ebx");
  asm volatile ("" : "=r" (si), "=r" (di), "=r" (bx));
  while (c < e)
    {
      foo ("c", (unsigned int) c);
      foo ("v", v);
      c++;
    }
  asm volatile ("" : : "r" (si), "r" (di), "r" (bx));
  return 0;
}
again -g -O2 -m32.


-- 


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

Reply via email to