------- Comment #20 from rguenth at gcc dot gnu dot org  2010-04-02 12:09 
-------
The obvious bug is that nonoverlapping_memrefs_p thinks that a NULL
MEM_OFFSET is equal to MEM_OFFSET == const0_rtx.  It is not, it's
"unknown offset".

The following should fix that.

Index: gcc/alias.c
===================================================================
--- gcc/alias.c (revision 157942)
+++ gcc/alias.c (working copy)
@@ -2268,6 +2268,10 @@ nonoverlapping_memrefs_p (const_rtx x, c
           : MEM_SIZE (rtly) ? INTVAL (MEM_SIZE (rtly)) :
           -1);

+  /* If the offset is unknown we cannot determine anything.  */
+  if (!moffsetx || !moffsety)
+    return 0;
+
   /* If we have an offset for either memref, it can update the values computed
      above.  */
   if (moffsetx)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42509

Reply via email to