https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125786
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:b3763e32ea4b0bf9e68bb89eac9bf2d7ab92680c commit r17-1562-gb3763e32ea4b0bf9e68bb89eac9bf2d7ab92680c Author: Richard Biener <[email protected]> Date: Mon Jun 15 10:37:29 2026 +0200 tree-optimization/125786 - do not rewrite stmts in reassoc We may not simply rewrite def stmts of associative operands as they might have multiple uses. The following appropriately creates a new stmt instead. PR tree-optimization/125786 * tree-ssa-reassoc.cc (optimize_vec_cond_expr): Create a new stmt instead of rewriting an existing possibly multi-use one. * gcc.dg/torture/pr125786.c: New testcase.
