https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120944
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:7dde99394cec91956a44934b5d6075d7e85f86d6 commit r13-9946-g7dde99394cec91956a44934b5d6075d7e85f86d6 Author: Richard Biener <[email protected]> Date: Fri Jul 4 09:08:19 2025 +0200 tree-optimization/120944 - bogus VN with volatile copies The following avoids translating expressions through volatile copies. PR tree-optimization/120944 * tree-ssa-sccvn.cc (vn_reference_lookup_3): Gate optimizations invalid when volatile is involved. * gcc.dg/torture/pr120944.c: New testcase. (cherry picked from commit 6ed1e2ae1a742d859c2dd74c9e7cebdd3618e8b1)
