This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/38745] [4.4 Regression] ICE: statement makes a memory store, but has no VDEFS
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jan 2009 02:11:03 -0000
- Subject: [Bug tree-optimization/38745] [4.4 Regression] ICE: statement makes a memory store, but has no VDEFS
- References: <bug-38745-16726@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from pinskia at gcc dot gnu dot org 2009-01-16 02:11 -------
Index: tree-ssa-forwprop.c
===================================================================
--- tree-ssa-forwprop.c (revision 143415)
+++ tree-ssa-forwprop.c (working copy)
@@ -775,29 +775,43 @@ forward_propagate_addr_expr_1 (tree name
&& !TYPE_VOLATILE (TREE_TYPE (rhs))
&& !TYPE_VOLATILE (TREE_TYPE (TREE_OPERAND (def_rhs, 0)))
&& operand_equal_p (TYPE_SIZE (TREE_TYPE (rhs)),
- TYPE_SIZE (TREE_TYPE (TREE_OPERAND (def_rhs, 0))),
0))
+ TYPE_SIZE (TREE_TYPE (TREE_OPERAND (def_rhs, 0))), 0)
+ /* Don't create a VCE inside an ADDR_EXPR which be used on the LHS later
+ on. */
+ && gimple_assign_rhs_code (use_stmt) != ADDR_EXPR)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38745