Bug in sibling call optimizations

Greg McGary greg@mcgary.org
Fri Jul 14 18:25:00 GMT 2000


The following fails with sibling-call optimizations
and succeeds without them.

------------------------------------------------------------------------------
typedef struct trio { int a, b, c; } trio;

int
bar (int i, trio t)
{
  if (t.a == t.b || t.a == t.c)
    abort ();
}

int
foo (trio t, int i)
{
  return bar (i, t);
}

main ()
{
  trio t = { 1, 2, 3 };

  foo (t, 4);
  exit (0);
}
------------------------------------------------------------------------------

Greg


More information about the Gcc-bugs mailing list