https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109219
Bug ID: 109219
Summary: csmith: ice in vect_slp_analyze_node_operations_1, at
tree-vect-slp.cc:5954
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
For this C code:
safe_lshift_func_int32_t_s_s_left, safe_lshift_func_int32_t_s_s_right,
safe_sub_func_uint64_t_u_u_ui2, safe_mul_func_uint64_t_u_u_ui2, g_79_2,
g_97_l_439;
g_97() {
unsigned short __trans_tmp_16;
long __trans_tmp_15;
int __trans_tmp_14, __trans_tmp_7;
int *l_437 = g_97;
for (; g_97_l_439; g_97_l_439 += 1) {
char l_502 = 0;
for (; l_502 < 4; l_502++) {
__trans_tmp_14 = safe_lshift_func_int32_t_s_s_right >= 2 ||
safe_lshift_func_int32_t_s_s_left
?: safe_lshift_func_int32_t_s_s_right;
__trans_tmp_15 = __trans_tmp_14 * safe_mul_func_uint64_t_u_u_ui2;
__trans_tmp_16 = -__trans_tmp_15;
__trans_tmp_7 =
(__trans_tmp_16 ^ 65535UL) - safe_sub_func_uint64_t_u_u_ui2;
*l_437 ^= (short)(__trans_tmp_7 ^ g_79_2);
}
}
}
main() {}
when compiled by recent gcc trunk and compiler flag -O3, does this:
$ ~/gcc/results/bin/gcc -c -w -O3 bug900.c
during GIMPLE pass: vect
bug900.c: In function ‘g_97’:
bug900.c:4:1: internal compiler error: in vect_slp_analyze_node_operations_1,
at tree-vect-slp.cc:5954
4 | g_97() {
| ^~~~
0x7d6a29 vect_slp_analyze_node_operations_1
../../trunk.year/gcc/tree-vect-slp.cc:5954
0x7d6a29 vect_slp_analyze_node_operations
../../trunk.year/gcc/tree-vect-slp.cc:6147
0x119b14f vect_slp_analyze_node_operations
../../trunk.year/gcc/tree-vect-slp.cc:6126
0x119b14f vect_slp_analyze_node_operations
../../trunk.year/gcc/tree-vect-slp.cc:6126
It is fine at -O2:
$ ~/gcc/results/bin/gcc -c -w -O2 bug900.c
$
The bug has existed since sometime before 20220403.