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

            Bug ID: 116569
           Summary: [15 Regression] ICE in to_constant, at poly-int.h:592
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Keywords: aarch64-sve, ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ktkachov at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64

int a;
short b, c, e;
long d, f;
long g(long h) {
  if (h)
    return h;
  return d;
}
void i(int h[][0][0][0]) {
  for (short j; j; j += 3) {
    a = g(h[1][2] ? 0 : h[1][1][1][1]);
    b = e ?: f % c;
  }
}

with -O3 -mcpu=neoverse-v2 ICEs with trunk:
0x24ef04b internal_error(char const*, ...)
        $SRC/gcc/diagnostic-global-context.cc:492
0x80ebd7 fancy_abort(char const*, int, char const*)
        $SRC/gcc/diagnostic.cc:1658
0x7fcc03 poly_int<2u, unsigned long>::to_constant() const
        $SRC/gcc/poly-int.h:592
0x1589ae7 poly_int<2u, unsigned long>::to_constant() const
        $SRC/gcc/poly-int.h:590
0x1589ae7 nunits_for_known_piecewise_op
        $SRC/gcc/tree-vect-generic.cc:96
0x1589ae7 expand_vector_piecewise
        $SRC/gcc/tree-vect-generic.cc:290
0x158c673 expand_vector_operation
        $SRC/gcc/tree-vect-generic.cc:1257
0x158d657 expand_vector_operations_1
        $SRC/gcc/tree-vect-generic.cc:2366
0x158d657 expand_vector_operations
        $SRC/gcc/tree-vect-generic.cc:2400
0x158d657 execute
        $SRC/gcc/tree-vect-generic.cc:2454

Reply via email to