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

            Bug ID: 82603
           Summary: [8 Regression] ICE in ifcvt_local_dce w/ -O2
                    -ftree-loop-vectorize
           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-alpha20171015 snapshot (r253772) ICEs when compiling the following
snippet w/ -O2 -ftree-loop-vectorize:

int
mr (unsigned int lf, int ms)
{
  unsigned int sw = 0;
  char *cu = (char *)&ms;

  while (ms < 1)
    {
      if (lf == 0)
        ms = 0;
      else
        ms = 0;
      ms += ((lf > 0) && ((lf > sw) ? 1 : ++*cu));
    }

  if (lf != 0)
    cu = (char *)&sw;
  *cu = lf;

  return ms;
}

% gcc-8.0.0-alpha20171015 -O2 -ftree-loop-vectorize -c qmv6xgzo.c
during GIMPLE pass: ifcvt
qmv6xgzo.c: In function 'mr':
qmv6xgzo.c:2:1: internal compiler error: Segmentation fault
 mr (unsigned int lf, int ms)
 ^~

Reply via email to