https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107569
--- Comment #50 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:41ade3399bd1ec9927be1bb818965831232eda4b commit r13-6834-g41ade3399bd1ec9927be1bb818965831232eda4b Author: Richard Biener <rguent...@suse.de> Date: Thu Mar 23 14:52:01 2023 +0100 tree-optimization/107569 - avoid wrecking earlier folding in FRE/PRE The following avoids picking up dead code left over from folding during FRE/PRE, effectively undoing propagations. PR tree-optimization/107569 * tree-ssa-sccvn.cc (eliminate_dom_walker::eliminate_stmt): Do not push SSA names with zero uses as available leader. (process_bb): Likewise. * g++.dg/opt/pr107569.C: New testcase.