aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2016-02-26 08:34:58 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2016-02-26 08:34:58 +0000
commit5aed7e2c0d9bde14f5c0e45e3d29727e6ec94324 (patch)
tree3dd3aecb6d28e8d12f988dbaf374e94218608ece /gcc/tree-ssa-structalias.c
parent8ba8c3757ba2d1325e75b637ca410609f716d4c0 (diff)
downloadgcc-5aed7e2c0d9bde14f5c0e45e3d29727e6ec94324.zip
gcc-5aed7e2c0d9bde14f5c0e45e3d29727e6ec94324.tar.gz
gcc-5aed7e2c0d9bde14f5c0e45e3d29727e6ec94324.tar.bz2
re PR target/69551 (Wrong code with single element vector insert)
2016-02-26 Richard Biener <rguenther@suse.de> PR tree-optimization/69551 * tree-ssa-structalias.c (get_constraint_for_ssa_var): When looking through aliases adjust DECL_PT_UID to refer to the ultimate alias target. * gcc.dg/torture/pr69951.c: New testcase. From-SVN: r233734
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index d7a7dc5..de12380 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -2943,6 +2943,14 @@ get_constraint_for_ssa_var (tree t, vec<ce_s> *results, bool address_p)
if (node && node->alias && node->analyzed)
{
node = node->ultimate_alias_target ();
+ /* Canonicalize the PT uid of all aliases to the ultimate target.
+ ??? Hopefully the set of aliases can't change in a way that
+ changes the ultimate alias target. */
+ gcc_assert ((! DECL_PT_UID_SET_P (node->decl)
+ || DECL_PT_UID (node->decl) == DECL_UID (node->decl))
+ && (! DECL_PT_UID_SET_P (t)
+ || DECL_PT_UID (t) == DECL_UID (node->decl)));
+ DECL_PT_UID (t) = DECL_UID (node->decl);
t = node->decl;
}
}