aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-sccvn.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r--gcc/tree-ssa-sccvn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index 22dd801..2cc76d8 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -1996,7 +1996,8 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_,
activation of a union member via a store makes the
values of untouched bytes unspecified. */
&& (known_eq (ref->size, BITS_PER_UNIT)
- || (get_alias_set (lhs) != 0
+ || (flag_strict_aliasing
+ && get_alias_set (lhs) != 0
&& ao_ref_alias_set (ref) != 0)))
{
tree *saved_last_vuse_ptr = data->last_vuse_ptr;