https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123887
--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:a8b02c07cdd852c569554c7a8a88d8a07e290e95 commit r15-10764-ga8b02c07cdd852c569554c7a8a88d8a07e290e95 Author: Richard Biener <[email protected]> Date: Fri Jan 30 15:32:39 2026 +0100 middle-end/123887 - trapping conditional operand turned unconditional The following properly checks expr_no_side_effects_p on two patterns that turns a conditionally evaluated operand into unconditonal. PR middle-end/123887 * match.pd ((zero_one ==/!= 0) ? .. z <op> y .. -> zero_one * z ..): Check evaluating z unconditionally has no side-effects, like trapping. * gcc.dg/torture/pr123887.c: New testcase. (cherry picked from commit c1fa15791ae458e1bd8db6842dfc021230521a65)
