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

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-31 
09:44:55 UTC ---
Index: gcc/tree-ssa-address.c
===================================================================
--- gcc/tree-ssa-address.c      (revision 174469)
+++ gcc/tree-ssa-address.c      (working copy)
@@ -365,7 +365,7 @@ create_mem_ref_raw (tree type, tree alia
      ???  As IVOPTs does not follow restrictions to where the base
      pointer may point to create a MEM_REF only if we know that
      base is valid.  */
-  if (TREE_CODE (base) == ADDR_EXPR
+  if ((TREE_CODE (base) == ADDR_EXPR || TREE_CODE (base) == INTEGER_CST)
       && (!index2 || integer_zerop (index2))
       && (!addr->index || integer_zerop (addr->index)))
     return fold_build2 (MEM_REF, type, base, addr->offset);

might hide the issue again (still worth fixing IMHO), and also makes
sense.

Reply via email to