https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100773
Bug ID: 100773
Summary: ice in operator[], at vec.h:890
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
Someplace between gcc trunk dated 20210524 (experimental) (0f3cd532fa02d178)
and 20210526 (experimental) (0eac9c60ac1f28ee), this C code:
fts_build_mail() {
int attempts = 2;
while (fts_build_mail_real())
if (--attempts == 0)
break;
}
with compiler flag -O2 does this:
$ /home/dcb/gcc/results/bin/gcc -c -O2 -w bug720.c
during GIMPLE pass: evrp
fts-build-mail.c: In function ‘fts_build_mail’:
fts-build-mail.c:633:1: internal compiler error: in operator[], at vec.h:890
633 | }
| ^
0x1789c8e vec<range_def_chain::rdc, va_heap, vl_embed>::operator[](unsigned
int)
../../trunk.git/gcc/vec.h:890
0x1789c8e vec<range_def_chain::rdc, va_heap, vl_ptr>::operator[](unsigned int)
../../trunk.git/gcc/vec.h:1461
0x1789c8e range_def_chain::register_dependency(tree_node*, tree_node*,
basic_blo
ck_def*)
../../trunk.git/gcc/gimple-range-gori.cc:179
0x177f4e6 fold_using_range::range_of_range_op(irange&, gimple*, fur_source&)
../../trunk.git/gcc/gimple-range.cc:447