https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97753
Bug ID: 97753
Summary: ice in operator[], at vec.h:880
Product: gcc
Version: unknown
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:
long a[6];
void d() {
for (int c; c; c++)
for (int b = 0; b < 8; b++)
((char *)&a[c])[b] = c;
}
compiled by recent gcc trunk and compiler flag -O3, does this:
during GIMPLE pass: vect
bug669.cc: In function ‘void d()’:
bug669.cc:2:6: internal compiler error: in operator[], at vec.h:880
2 | void d() {
| ^
0x861070 vec<_slp_tree*, va_heap, vl_embed>::operator[](unsigned int)
../../trunk.git/gcc/vec.h:880
0x861070 vec<_slp_tree*, va_heap, vl_ptr>::operator[](unsigned int)
../../trunk.git/gcc/vec.h:1451
0x861070 vectorizable_induction(_loop_vec_info*, _stmt_vec_info*, gimple**,
_slp
_tree*, vec<stmt_info_for_cost, va_heap, vl_ptr>*)
../../trunk.git/gcc/tree-vect-loop.c:7929
0x1487820 vect_transform_stmt(vec_info*, _stmt_vec_info*,
gimple_stmt_iterator*,
_slp_tree*, _slp_instance*)
../../trunk.git/gcc/tree-vect-stmts.c:10782
The problem first seems to appear sometime between 20201104 and 20201105.