]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/120944 - bogus VN with volatile copies
authorRichard Biener <rguenther@suse.de>
Fri, 4 Jul 2025 07:08:19 +0000 (09:08 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 4 Jul 2025 10:40:08 +0000 (12:40 +0200)
commit6ed1e2ae1a742d859c2dd74c9e7cebdd3618e8b1
tree2d6c78fddc41d216d254fa3c7962be737c038ec9
parent36599edba074a53b273566b3f8eb6c8fa50a8969
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.
gcc/testsuite/gcc.dg/torture/pr120944.c [new file with mode: 0644]
gcc/tree-ssa-sccvn.cc