[Bug rtl-optimization/49235] [4.7 Regression] ICE: in int_mode_for_mode, at stor-layout.c:424 with -O -fno-delete-null-pointer-checks -fno-tree-scev-cprop -ftree-vectorize -fno-vect-cost-model

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue May 31 10:52:00 GMT 2011


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.



More information about the Gcc-bugs mailing list