This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/38745] [4.4 Regression] ICE: statement makes a memory store, but has no VDEFS



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]