https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111917
Bug ID: 111917
Summary: ICE in as_a, at is-a.h:255 since GCC-8
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: shaohua.li at inf dot ethz.ch
Target Milestone: ---
gcc at -O3 crashed.
I didn't bisect this case because it affected even gcc-8.
Compiler explorer: https://godbolt.org/z/7Mz9G6Kro
$ cat a.c
long a() {
long b, c;
for (; b; b++)
c <<= 1;
return c;
}
static int d() {
e:
f:
for (; a();)
;
goto f;
return 0;
}
int main() { d(); }
$
$ gcc -O3 a.c
during GIMPLE pass: unswitch
a.c: In function 'int main()':
a,c:15:5: internal compiler error: in as_a, at is-a.h:255
15 | int main() { d(); }
| ^~~~
0x26259de internal_error(char const*, ...)
???:0
0xaf830e fancy_abort(char const*, int, char const*)
???:0
0x15b8af2 number_of_iterations_exit(loop*, edge_def*, tree_niter_desc*, bool,
bool, basic_block_def**)
???:0
0x14fca28 number_of_latch_executions(loop*)
???:0
0x15ba69d estimate_numbers_of_iterations(loop*)
???:0
0x15bc037 estimated_loop_iterations(loop*,
generic_wide_int<widest_int_storage<131072> >*)
???:0
0x15bc067 estimated_loop_iterations_int(loop*)
???:0
0x15cf559 tree_ssa_unswitch_loops(function*)
???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
$