https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112773
Bug ID: 112773
Summary: [14 Regression] RISC-V ICE: in
force_align_down_and_div, at poly-int.h:1828 on
rv32gcv_zvl256b
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: patrick at rivosinc dot com
Target Milestone: ---
Created attachment 56724
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56724&action=edit
-freport-bug output
during RTL pass: expand
red.c: In function 'e':
red.c:4:6: internal compiler error: in force_align_down_and_div, at
poly-int.h:1828
4 | void e(unsigned f) {
| ^
0x9b006c poly_int<2u, unsigned long> force_align_down_and_div<2u, unsigned
long, int>(poly_int<2u, unsigned long> const&, int)
../../../gcc/gcc/poly-int.h:1828
0x9b006c poly_int<2u, unsigned long> force_align_down_and_div<2u, unsigned
long, int>(poly_int<2u, unsigned long> const&, int)
../../../gcc/gcc/poly-int.h:1826
0x9b006c extract_bit_field_1
../../../gcc/gcc/expmed.cc:1861
0xe42532 extract_bit_field(rtx_def*, poly_int<2u, unsigned long>, poly_int<2u,
unsigned long>, int, rtx_def*, machine_mode, machine_mode, bool, rtx_def**)
../../../gcc/gcc/expmed.cc:2149
0xe607a9 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
../../../gcc/gcc/expr.cc:11804
0xe6dddf expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
../../../gcc/gcc/expr.cc:9046
0xe6dddf expand_expr(tree_node*, rtx_def*, machine_mode, expand_modifier)
../../../gcc/gcc/expr.h:310
0xe6dddf store_expr(tree_node*, rtx_def*, int, bool, bool)
../../../gcc/gcc/expr.cc:6232
0xe6e679 expand_assignment(tree_node*, tree_node*, bool)
../../../gcc/gcc/expr.cc:6070
0xd29577 expand_gimple_stmt_1
../../../gcc/gcc/cfgexpand.cc:3947
0xd29577 expand_gimple_stmt
../../../gcc/gcc/cfgexpand.cc:4045
0xd2e6c0 expand_gimple_basic_block
../../../gcc/gcc/cfgexpand.cc:6101
0xd30656 execute
../../../gcc/gcc/cfgexpand.cc:6836
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 /scratch/tmp/ccSDQZzq.out file, please attach
this to your bugreport.
Reduced testcase:
long long a;
int b, c;
int *d;
void e(unsigned f) {
for (;; ++c)
if (f) {
a = 0;
for (; a <= 3; a++) {
f = 0;
for (; f <= 0; f++)
if ((long)a)
break;
}
if (b)
*d = f;
}
}