[Bug tree-optimization/72866] Compile time hog w/ -O3 (-Ofast)

asolokha at gmx dot com gcc-bugzilla@gcc.gnu.org
Mon Sep 5 06:14:00 GMT 2016


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

--- Comment #7 from Arseny Solokha <asolokha at gmx dot com> ---
I have another snippet that works w/ 7.0.0-alpha20160731 snapshot, but still
takes indefinite time to compile even by 7.0.0-alpha20160904, i.e. after the
fix. Should I file another PR for it?

void
vr (int of, unsigned char bw)
{
  int d1;
  int lm = 0;

  for (d1 = 0; d1 < 3; ++d1)
    {
      const int vl = 2;

      while (bw < vl)
        {
        }
      if (bw != vl)
        lm -= vl;
    }
  while (++of < 1)
    {
      lm /= bw;
      of += lm;
    }
}

(Should be compiled at -O2 or -Os.)


More information about the Gcc-bugs mailing list