summaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-03 17:14:44 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-03 17:14:44 +0000
commitc6b80e5d0234fd1852219d2b629172d39eebe3d0 (patch)
treeeae4f0a5e42f63d453e85ed7b4d12881c574f707 /gcc/alias.c
parentcacf592e1a6ff774850b64f35e9731a889086663 (diff)
downloadgcc-c6b80e5d0234fd1852219d2b629172d39eebe3d0.tar.gz
2010-04-03 Richard Guenther <rguenther@suse.de>
PR middle-end/42509 * alias.c (nonoverlapping_memrefs_p): For spill-slot accesses require a non-NULL MEM_OFFSET. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157954 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index 317aeba5503..cd7e2a06bdb 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -2147,6 +2147,13 @@ nonoverlapping_memrefs_p (const_rtx x, const_rtx y)
if (exprx == 0 || expry == 0)
return 0;
+ /* For spill-slot accesses make sure we have valid offsets. */
+ if ((exprx == get_spill_slot_decl (false)
+ && ! MEM_OFFSET (x))
+ || (expry == get_spill_slot_decl (false)
+ && ! MEM_OFFSET (y)))
+ return 0;
+
/* If both are field references, we may be able to determine something. */
if (TREE_CODE (exprx) == COMPONENT_REF
&& TREE_CODE (expry) == COMPONENT_REF