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)
2 files changed