aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2007-11-15 09:06:58 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2007-11-15 09:06:58 +0000
commitf83ca2512f522d26fd9282b0e803e1a0afeb935d (patch)
treef828992d85798ae89d20b59089bccde344be67c9 /gcc/tree-ssa-structalias.c
parentcc3c24ed0273b988420c807675d21a70c0787a7a (diff)
downloadgcc-f83ca2512f522d26fd9282b0e803e1a0afeb935d.zip
gcc-f83ca2512f522d26fd9282b0e803e1a0afeb935d.tar.gz
gcc-f83ca2512f522d26fd9282b0e803e1a0afeb935d.tar.bz2
tree-ssa-structalias.c (set_uids_in_ptset): Use the pointed-to type for TBAA pruning.
2007-11-15 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (set_uids_in_ptset): Use the pointed-to type for TBAA pruning. (find_what_p_points_to): Call set_uids_in_ptset with the original pointer, not the decl of the solution we collapsed to. From-SVN: r130195
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 479145a..3820b19 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -4719,7 +4719,10 @@ set_uids_in_ptset (tree ptr, bitmap into, bitmap from, bool is_derefed,
{
unsigned int i;
bitmap_iterator bi;
- alias_set_type ptr_alias_set = get_alias_set (TREE_TYPE (ptr));
+ alias_set_type ptr_alias_set;
+
+ gcc_assert (POINTER_TYPE_P (TREE_TYPE (ptr)));
+ ptr_alias_set = get_alias_set (TREE_TYPE (TREE_TYPE (ptr)));
EXECUTE_IF_SET_IN_BITMAP (from, 0, i, bi)
{
@@ -4996,7 +4999,7 @@ find_what_p_points_to (tree p)
pi->pt_global_mem = 1;
}
- set_uids_in_ptset (vi->decl, finished_solution, vi->solution,
+ set_uids_in_ptset (p, finished_solution, vi->solution,
vi->directly_dereferenced,
vi->no_tbaa_pruning);
result = shared_bitmap_lookup (finished_solution);