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

            Bug ID: 96456
           Summary: [10 Regression] ICE in expand_insn, at optabs.c:7511
                    on s390x-linux-gnu
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at debian dot org
  Target Milestone: ---

seen with the gcc-10 branch 20200725 on s390x-linux-gnu. worked around by
dropping to -O2, or either removing the -ffast-math or -fno-finite-math-only
flags. Didn't check yet trunk.

$ cat aops.i
int b, c, d;
double *e;
int f() {
  double *a = a;
  int g = d, f = c, h = b;
  if (__builtin_expect(f, 0))
    for (; g < h; g++)
      e[g] = (int)(a[g] >= 0.0 ? g + 0.99999999 : a[g]);
  return 0;
}

$ s390x-linux-gnu-gcc -c -O3 -std=gnu99 -ffast-math -fno-finite-math-only
-fstack-protector-strong -Wall -fstack-clash-protection aops.i 
during RTL pass: expand
aops.i: In function ‘f’:
aops.i:8:12: internal compiler error: in expand_insn, at optabs.c:7511
    8 |       e[g] = (int)(a[g] >= 0.0 ? g + 0.99999999 : a[g]);
      |       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.

Reply via email to