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

--- Comment #6 from Zhendong Su <zhendong.su at inf dot ethz.ch> ---
Another repro for the same issue (as -fno-ipa-cp also avoids it): 

[579] % gcctk -O2 small.c; ./a.out
[580] % gcctk -O3 small.c; ./a.out
Aborted
[581] % gcctk -O3 -fno-ipa-cp small.c; ./a.out
[582] % 
[582] % cat small.c
int a, b, c, *d = &c, e, f;

char g (char h)
{
  return h < 0 || a || h ? h : 0;
}

static int i (int h)
{
  f = g (1);
  e = *d = f && h;
  a = 0;
  return b;
}

int main ()
{
  e = i (1);
  while (b)
    i (0);
  if (!c)
    __builtin_abort ();
  return 0;
}

Reply via email to