summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authordberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-05 15:31:17 +0000
committerdberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-05 15:31:17 +0000
commit232a3153e67e56f64fd212a6d908dd8403371a73 (patch)
tree88871fd1f2075db99ebe543b01fa76b3fb6dc63c /gcc/tree-ssa-structalias.c
parent40d790a36b5ecc26952f3a6c83cb8ac641244c25 (diff)
downloadgcc-232a3153e67e56f64fd212a6d908dd8403371a73.tar.gz
2005-07-04 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-structalias.c (get_constraint_exp_from_ssa_var): Only fall back to saying it points to readonly memory if we can't do better. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101625 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index f48bcb24678..96071d62b97 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -1849,13 +1849,14 @@ get_constraint_exp_from_ssa_var (tree t)
cexpr.type = SCALAR;
- if (TREE_READONLY (t))
+ cexpr.var = get_id_for_tree (t);
+ /* If we determine the result is "anything", and we know this is readonly,
+ say it points to readonly memory instead. */
+ if (cexpr.var == anything_id && TREE_READONLY (t))
{
cexpr.type = ADDRESSOF;
cexpr.var = readonly_id;
}
- else
- cexpr.var = get_id_for_tree (t);
cexpr.offset = 0;
return cexpr;