https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128759
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrea Pinski <[email protected]>: https://gcc.gnu.org/g:00e5d96cb4ca1a17666a823cec041b9729960e18 commit r17-6374-g00e5d96cb4ca1a17666a823cec041b9729960e18 Author: Andrea Pinski <[email protected]> Date: Tue Nov 17 14:05:15 2026 -0800 range-op: Fix operator_pointer_diff's op1_op2_relation when rhs1 is undefined [PR128759] I had missed that rhs1 could be undefined and then getting the type of it would cause an ICE. Note this is unlike operator_minus's op1_op2_relation which uses overflow_free and overflow_free has the check there. Committed the fix as obvious after a bootstrap/test on x86_64-linux-gnu. PR tree-optimization/128759 gcc/ChangeLog: * range-op-ptr.cc (operator_pointer_diff::op1_op2_relation): Fix rhs1 being undefined. gcc/testsuite/ChangeLog: * gcc.dg/torture/pr128759-1.c: New test. Signed-off-by: Andrea Pinski <[email protected]>
