[Bug tree-optimization/125040] [15/16/17 regression] internal compiler error: in clean, at tree-ssa-pre.cc:2166, during GIMPLE pass: pre
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Apr 27 13:45:47 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125040
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Note the assert says that the topological sort sorted_array_from_bitmap_set is
supposed to perform doesn't work, so when we determine validness of an
expression a later expression pruning makes the former checked expression
invalid.
The set we clean is
{ c_16 (0016), _8 (0008), {minus_expr,b_10,count_11} (0002), {nop_expr,_2}
(0003), {plus_expr,_3,18446744073709551615} (0025), {mult_expr,_25,4} (0004),
{pointer_plus_expr,c_16,_4} (0005), count_23 (0023), b_24 (0024),
{mem_ref<(A32)(int *)0B>,_5}@.MEM_22 (0011), {plus_expr,count_11,2} (0037),
{plus_expr,b_10,2} (0038) }
and we prune {minus_expr,b_10,count_11} (0002) and its value and
{plus_expr,b_10,2} (0038) and its value
that somehow makes {nop_expr,_2} (0003) no longer valid, _2 has value 0002.
Somehow we have a cycle here, something I did not expect - we'd have to
elide such cycles in one go if we want to not iterate. I'll note this
specific code is the way it is for quite some time, so it's probably
VN changes or unrelated IL differences causing it to not ICE on older
branches.
More information about the Gcc-bugs
mailing list