summaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-15 09:25:34 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-15 09:25:34 +0000
commit0f2b32ac0e69e8d98668ec6582b59e653c9fe1ae (patch)
tree99fb493292063f503e5e15e9f5a7b7019d89a89f /gcc/alias.c
parentd8758d918badf00fcb5368c66c1ad75c7436174b (diff)
downloadgcc-0f2b32ac0e69e8d98668ec6582b59e653c9fe1ae.tar.gz
2009-07-15 Richard Guenther <rguenther@suse.de>
PR middle-end/40753 * alias.c (ao_ref_from_mem): Reject FUNCTION_DECL and LABEL_DECL bases. * gcc.c-torture/compile/pr40753.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149664 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index e9cc2d85f96..fc259b8ef2d 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -279,6 +279,11 @@ ao_ref_from_mem (ao_ref *ref, const_rtx mem)
&& TREE_CODE (TREE_OPERAND (base, 0)) != SSA_NAME)
return false;
+ /* The tree oracle doesn't like to have these. */
+ if (TREE_CODE (base) == FUNCTION_DECL
+ || TREE_CODE (base) == LABEL_DECL)
+ return false;
+
/* If this is a reference based on a partitioned decl replace the
base with an INDIRECT_REF of the pointer representative we
created during stack slot partitioning. */