summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-07 05:21:11 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-07 05:21:11 +0000
commit9ebd44cdc69ce1979995609a31742f282f8fcc6b (patch)
tree2c640d7701a095785e7663dacb7d5fedc77a4456 /gcc/tree-ssa-alias.c
parentd480913686c7452f216d96d0bcd0f494cfc747a8 (diff)
downloadgcc-9ebd44cdc69ce1979995609a31742f282f8fcc6b.tar.gz
2009-09-07 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 151466 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@151467 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r--gcc/tree-ssa-alias.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index 7e83a84b82c..89804a923b1 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -784,6 +784,12 @@ refs_may_alias_p_1 (ao_ref *ref1, ao_ref *ref2, bool tbaa_p)
|| is_gimple_min_invariant (base2))
return false;
+ /* We can end up refering to code via function decls. As we likely
+ do not properly track code aliases conservatively bail out. */
+ if (TREE_CODE (base1) == FUNCTION_DECL
+ || TREE_CODE (base2) == FUNCTION_DECL)
+ return true;
+
/* Defer to simple offset based disambiguation if we have
references based on two decls. Do this before defering to
TBAA to handle must-alias cases in conformance with the