https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105337

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
printf isn't really needed.  This fails even with -O2, doesn't with -O1 or -O0:

__attribute__((noipa)) void
bar (int x)
{
  (void) x;
}

int a;

int
foo (void)
{
  int b, c;
  for (b = 0; b < 3; b++)
    {
      if (!a)
        break;
      c--;
      bar (c);
    }
  return b;
}

int
main ()
{
  if (foo ())
    __builtin_abort ();
  return 0;
}

Reply via email to