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

            Bug ID: 84830
           Summary: [8 Regression] ICE in compute_antic, at
                    tree-ssa-pre.c:2388
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-8.0.0-alpha20180304 snapshot (r258371) ICEs when compiling the following
snippet w/ -O2 (-O3, -Ofast, -Os) -fno-tree-ch -fno-tree-vrp:

int x0;

void
br (int yp, int oo)
{
  int *qi = &yp;

  if (oo == 0)
    {
g8:
      if (x0 != 0)
        x0 = yp;
      else if (oo != 0)
        x0 = yp;

      if (x0 == 0)
        {
          *qi = 0;
          x0 = *qi;
        }

      if (x0 != 0)
        {
          ++oo;
          goto g8;
        }

      if (yp == oo)
        yp += !!oo;
    }
  else
    {
      x0 = 1;
      while (x0 < 2)
        {
          qi = &oo;
          ++oo;
          x0 = 1;
        }
    }

  goto g8;
}

% gcc-8.0.0-alpha20180304 -O2 -fno-tree-ch -fno-tree-vrp -c ww2kbrze.c
during GIMPLE pass: pre
ww2kbrze.c: In function 'br':
ww2kbrze.c:4:1: internal compiler error: in compute_antic, at
tree-ssa-pre.c:2388
 br (int yp, int oo)
 ^~
0x69d01c compute_antic
       
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20180304/work/gcc-8-20180304/gcc/tree-ssa-pre.c:2388
0x69d01c execute
       
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20180304/work/gcc-8-20180304/gcc/tree-ssa-pre.c:4144

Reply via email to