https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115929
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Richard Sandiford <rsand...@gcc.gnu.org>: https://gcc.gnu.org/g:fec38d7987dd6d68b234b0076b57ac66a30a3a1d commit r15-2071-gfec38d7987dd6d68b234b0076b57ac66a30a3a1d Author: Richard Sandiford <richard.sandif...@arm.com> Date: Tue Jul 16 15:33:23 2024 +0100 rtl-ssa: Fix removal of order_nodes [PR115929] order_nodes are used to implement ordered comparisons between two insns with the same program point number. remove_insn would remove an order_node from its splay tree, but didn't remove it from the insn. This caused confusion if the insn was later reinserted somewhere else that also needed an order_node. gcc/ PR rtl-optimization/115929 * rtl-ssa/insns.cc (function_info::remove_insn): Remove an order_node from the instruction as well as from the splay tree. gcc/testsuite/ PR rtl-optimization/115929 * gcc.dg/torture/pr115929-1.c: New test.