https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103099
Martin Jambor <jamborm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jamborm at gcc dot
gnu.org
Status|NEW |ASSIGNED
--- Comment #4 from Martin Jambor <jamborm at gcc dot gnu.org> ---
It is missed unsharing, sorry. The following seems to fix it. I'll double
check the other use of remap_with_debug_expressions and propose a patch.
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index d78e4392b69..431e88dcf67 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -1822,7 +1822,7 @@ remap_gimple_stmt (gimple *stmt, copy_body_data *id)
if (gimple_debug_bind_p (stmt))
{
tree var = gimple_debug_bind_get_var (stmt);
- tree value = gimple_debug_bind_get_value (stmt);
+ tree value = unshare_expr (gimple_debug_bind_get_value (stmt));
if (id->param_body_adjs
&& id->param_body_adjs->m_dead_stmts.contains (stmt))
id->param_body_adjs->remap_with_debug_expressions (&value);