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 lto/53195] [4.8 Regression] ICE seg fault in lto (in set_is_used (tp=Unhandled dwarf expression opcode 0xf3 ) at ../.././gcc/tree-flow-inline.h:567)


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

--- Comment #9 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-07 10:27:42 UTC ---
Simpler fix:

Index: tree-inline.c
===================================================================
--- tree-inline.c       (revision 187228)
+++ tree-inline.c       (working copy)
@@ -2607,6 +2607,17 @@ setup_one_parameter (copy_body_data *id,
   /* Make gimplifier happy about this variable.  */
   DECL_SEEN_IN_BIND_EXPR_P (var) = 1;

+  /* We are eventually using the value - make sure all variables
+     referenced therein are properly recorded.  */
+  if (value
+      && gimple_in_ssa_p (cfun)
+      && TREE_CODE (value) == ADDR_EXPR)
+    {
+      tree base = get_base_address (TREE_OPERAND (value, 0));
+      if (base && TREE_CODE (base) == VAR_DECL)
+       add_referenced_var (base);
+    }
+
   /* If the parameter is never assigned to, has no SSA_NAMEs created,
      we would not need to create a new variable here at all, if it
      weren't for debug info.  Still, we can just use the argument


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