[Bug middle-end/69715] [4.9/5/6 regression] ICE: in store_bit_field_1, at expmed.c:839

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 8 12:47:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69715

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fix for the invalid GIMPLE (we can enhance this but anyting other than plain
DECLs
are mishandled right now):

Index: gcc/tree-ssa.c
===================================================================
--- gcc/tree-ssa.c      (revision 233211)
+++ gcc/tree-ssa.c      (working copy)
@@ -1436,7 +1443,8 @@ execute_update_addresses_taken (void)
               tree lhs = gimple_get_lhs (stmt);
               if (lhs
                  && TREE_CODE (lhs) != SSA_NAME
-                 && non_rewritable_lvalue_p (lhs))
+                 && ((code == GIMPLE_CALL && ! DECL_P (lhs))
+                     || non_rewritable_lvalue_p (lhs)))
                {
                  decl = get_base_address (lhs);
                  if (DECL_P (decl))


More information about the Gcc-bugs mailing list