summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-copy.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2006-04-11 05:52:45 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2006-04-11 05:52:45 +0000
commite27ef4689fd2b241e7b9cefd0e69cf923fbf148a (patch)
tree8f3fb1be74c0d398df2d5f881cf972cd746e2d0b /gcc/tree-ssa-copy.c
parenta01acf144a59efd26dca417d2a16e5a7e1a9f87b (diff)
downloadgcc-e27ef4689fd2b241e7b9cefd0e69cf923fbf148a.tar.gz
PR/27087
* tree-ssa-copy.c (may_propagate_copy): Test flow sensitive alias information too. * gcc.c-torture/compile/pr27087.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112849 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-copy.c')
-rw-r--r--gcc/tree-ssa-copy.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c
index fca44d76c05..f1b67b5bf2a 100644
--- a/gcc/tree-ssa-copy.c
+++ b/gcc/tree-ssa-copy.c
@@ -117,6 +117,21 @@ may_propagate_copy (tree dest, tree orig)
else if (get_alias_set (TREE_TYPE (type_d)) !=
get_alias_set (TREE_TYPE (type_o)))
return false;
+
+ /* Also verify flow-sensitive information is compatible. */
+ if (SSA_NAME_PTR_INFO (orig) && SSA_NAME_PTR_INFO (dest))
+ {
+ struct ptr_info_def *orig_ptr_info = SSA_NAME_PTR_INFO (orig);
+ struct ptr_info_def *dest_ptr_info = SSA_NAME_PTR_INFO (dest);
+
+ if (orig_ptr_info->name_mem_tag
+ && dest_ptr_info->name_mem_tag
+ && orig_ptr_info->pt_vars
+ && dest_ptr_info->pt_vars
+ && !bitmap_intersect_p (dest_ptr_info->pt_vars,
+ orig_ptr_info->pt_vars))
+ return false;
+ }
}
/* If the destination is a SSA_NAME for a virtual operand, then we have