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

            Bug ID: 128706
           Summary: [17 Regression] RISC-V: ICE in immed_wide_int_const,
                    at emit-rtl.cc:770 at -O3 with -march=rv64gcv for a
                    loop bounded by a _BitInt(65)
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: shimizu2486 at gmail dot com
  Target Milestone: ---
            Target: riscv64-linux-gnu

Live reproducer: https://godbolt.org/z/W9aMPr8f5

$ cat t1.c
unsigned f(_BitInt(65) m) {
  unsigned i = 0;
  while (i < m)
    i++;
  return i;
}

$ riscv64-linux-gnu-gcc -march=rv64gcv -O3 -c t1.c
during RTL pass: expand
t1.c: In function 'f':
t1.c:1:10: internal compiler error: in immed_wide_int_const, at emit-rtl.cc:770
    1 | unsigned f(_BitInt(65) m) {
      |          ^
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

  riscv64 trunk (a2a11abf)        ICE
  riscv64 16.2.0                  compiles

-O3 and -O2 -ftree-loop-vectorize ICE; -O1, -O2, -Os, -fno-tree-loop-vectorize
and -march=rv64gc compile.
  • [Bug tree-optimization/128706] N... shimizu2486 at gmail dot com via Gcc-bugs

Reply via email to