------- Comment #5 from jamborm at gcc dot gnu dot org  2008-11-04 15:51 -------
Right, so this is the most simple (albeit not yet tested) patch I've
been able to come up with.  I am not sure what overall impact this is
going to have.  I'll briefly try to come up with something more
sophisticated...

Index: gcc/tree-ssa-forwprop.c
===================================================================
--- gcc/tree-ssa-forwprop.c     (revision 141546)
+++ gcc/tree-ssa-forwprop.c     (working copy)
@@ -812,6 +812,7 @@ forward_propagate_addr_expr_1 (tree name
   array_ref = TREE_OPERAND (def_rhs, 0);
   if (TREE_CODE (array_ref) != ARRAY_REF
       || TREE_CODE (TREE_TYPE (TREE_OPERAND (array_ref, 0))) != ARRAY_TYPE
+      || TREE_CODE (TREE_OPERAND (array_ref, 0)) == INDIRECT_REF
       || !integer_zerop (TREE_OPERAND (array_ref, 1)))
     return false;


-- 


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

Reply via email to