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

            Bug ID: 87485
           Summary: [9 Regression] Compile time hog w/ -O2
                    -fschedule-insns -fno-guess-branch-probability
                    -fno-isolate-erroneous-paths-dereference
                    -fno-omit-frame-pointer -fno-split-wide-types
                    -fno-tree-ccp -fno-tree-sra
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: x86_64-pc-linux-gnu

gcc-9.0.0-alpha20180930 snapshot (r264727) takes indefinite time when compiling
the following snippet w/ -O2 -fschedule-insns -fno-guess-branch-probability
-fno-isolate-erroneous-paths-dereference -fno-omit-frame-pointer
-fno-split-wide-types -fno-tree-ccp -fno-tree-sra:

int *xh;

int
c8 (__int128 n8, int dx, int b7)
{
  __int128 fl;

  *xh = ((!!dx ? dx : n8) * dx | n8) * 2;

  if (b7 == 0)
    {
      unsigned int e4 = 1;
      __int128 *lj = &fl;

      for (*xh = 0; *xh < 1; *xh += dx)
        {
        }

      *xh += fl < (e4 / 0);
      goto f0;

 c7:
      while (fl < 1)
        {
        }

      ++*xh;
    }

  goto c7;

 f0:
  return 0;
}

Previously weekly snapshot of the trunk has been ICEing on the same snippet w/
"internal compiler error: Maximum number of LRA assignment passes is achieved
(30)". I believe it stopped ICEing after r264726.

Reply via email to