https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107937
Bug ID: 107937
Summary: ice in find_var_cmp_const, at
gimple-predicate-analysis.cc:257
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: ---
This reduced C code:
double getk_intersect_line_with_ycylinder_r,
getk_intersect_line_with_ycylinder_a;
getk_intersect_line_with_ycylinder_i;
getk_intersect_line_with_ycylinder(double *k2) {
if (getk_intersect_line_with_ycylinder_r < 0.)
return sqrt(getk_intersect_line_with_ycylinder_r);
*k2 = 0 / getk_intersect_line_with_ycylinder_a;
{
double k2;
for (; getk_intersect_line_with_ycylinder_i;
getk_intersect_line_with_ycylinder_i++)
getk_intersect_line_with_ycylinder(&k2);
vecscale(k2);
}
}
when compiled by recent gcc trunk and compiler flags -O3 -Wall, does this:
during GIMPLE pass: uninit
bug865.c:4:1: internal compiler error: in find_var_cmp_const, at
gimple-predicate-analysis.cc:257
4 | getk_intersect_line_with_ycylinder(double *k2) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x1b3ad6c find_var_cmp_const(vec<vec<pred_info, va_heap, vl_ptr>, va_heap,
vl_ptr>, gphi*, gimple**, tree_node**)
../../trunk.d1/gcc/gimple-predicate-analysis.cc:257
0x1b3ad6c uninit_analysis::overlap(gphi*, unsigned int, hash_set<gphi*, false,
default_hash_traits<gphi*> >*, predicate const&)
../../trunk.d1/gcc/gimple-predicate-analysis.cc:648
I'll have a go at finding a git range for the problem.