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: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jan 2009 23:21:45 -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 #14 from rguenth at gcc dot gnu dot org 2009-01-22 23:21 -------
non-optimal tree-ssa-alias.c part:
Index: tree-ssa-alias.c
===================================================================
--- tree-ssa-alias.c (revision 143555)
+++ tree-ssa-alias.c (working copy)
@@ -2483,6 +2483,21 @@ update_alias_info_1 (gimple stmt, struct
if (addr_taken)
bitmap_ior_into (gimple_addressable_vars (cfun), addr_taken);
+ /* If we have a call or an assignment, see if the lhs contains
+ a local decl that requires not to be a gimple register. */
+ if (gimple_code (stmt) == GIMPLE_ASSIGN
+ || gimple_code (stmt) == GIMPLE_CALL)
+ {
+ tree lhs = gimple_get_lhs (stmt);
+ /* A plain decl does not need it set. */
+ if (lhs && handled_component_p (lhs))
+ {
+ tree var = get_base_address (lhs);
+ if (DECL_P (var))
+ bitmap_set_bit (gimple_addressable_vars (cfun), DECL_UID (var));
+ }
+ }
+
/* Process each operand use. For pointers, determine whether they
are dereferenced by the statement, or whether their value
escapes, etc. */
which then fixes the testcase.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38745