https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121493
--- Comment #2 from GCC 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:5294840e3c7bf9bd98016dec07f54ee8dc71714a commit r16-3156-g5294840e3c7bf9bd98016dec07f54ee8dc71714a Author: Richard Biener <rguent...@suse.de> Date: Mon Aug 11 10:42:47 2025 +0200 tree-optimization/121493 - another missed VN with aggregate copy This is another case where opportunistically handling a first aggregate copy where we failed to match up the refs exactly (as we don't insert missing handling components) yields to a failure in the second aggregate copy that we visit. Add another fixup to deal with such situations, in-line with that present opportunistic handling. PR tree-optimization/121493 * tree-ssa-sccvn.cc (vn_reference_lookup_3): Opportunistically strip components with known offset. * gcc.dg/tree-ssa/ssa-fre-109.c: New testcase.