https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122474
Bug ID: 122474
Summary: [16 Regression] RISC-V: ICE in expand_fn_using_insn,
at internal-fn.cc:269
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: ewlu at rivosinc dot com
Target Milestone: ---
Created attachment 62660
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62660&action=edit
freport-bug output
Testcase:
_Bool a;
void b(unsigned c[][8][8][8][8][8]) {
for (int d = 1; d; d += 3)
for (int e = 0; e < 11; e += 2)
for (short f = 0; f < 1; f = 30482)
for (short g = 0; g < 014; g++)
a = ({
int h = a;
int i = c[2][f][d][d][d][d] ^ c[g][g][1][2][g][g];
i ? h : i;
});
}
Command/backtrace:
$
/scratch/ewlu/daily-upstream-build/build-gcv/bin/riscv64-unknown-linux-gnu-gcc
-I/scratch/ewlu/ci/compiler-fuzz-ci/csmith-build/include -fsigned-char
-fno-strict-aliasing -fwrapv -march=rv64gcv_zvl256b -O3 red.c -o rv64gcv.out -w
-freport-bug
during RTL pass: expand
red.c: In function 'b':
red.c:2:6: internal compiler error: in expand_fn_using_insn, at
internal-fn.cc:269
2 | void b(unsigned c[][8][8][8][8][8]) {
| ^
0x30740a1 internal_error(char const*, ...)
../../../gcc/gcc/diagnostic-global-context.cc:787
0xd6e001 fancy_abort(char const*, int, char const*)
../../../gcc/gcc/diagnostics/context.cc:1806
0xba59bb expand_fn_using_insn
../../../gcc/gcc/internal-fn.cc:269
0xf76d2f expand_call_stmt
../../../gcc/gcc/cfgexpand.cc:3109
0xf76d2f expand_gimple_stmt_1
../../../gcc/gcc/cfgexpand.cc:4235
0xf76d2f expand_gimple_stmt
../../../gcc/gcc/cfgexpand.cc:4382
0xf78367 expand_gimple_basic_block
../../../gcc/gcc/cfgexpand.cc:6501
0xf7a497 execute
../../../gcc/gcc/cfgexpand.cc:7248
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Preprocessed source stored into /tmp/cczjGMZz.out file, please attach this to
your bugreport.
Godbolt: https://godbolt.org/z/P1YvahrqM
Found via fuzzer