summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-live.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-live.c')
-rw-r--r--gcc/tree-ssa-live.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c
index 903faa91649..3edda1e378e 100644
--- a/gcc/tree-ssa-live.c
+++ b/gcc/tree-ssa-live.c
@@ -798,9 +798,16 @@ remove_unused_locals (void)
{
if (!is_used_p (var))
{
+ tree def;
if (cfun->nonlocal_goto_save_area
&& TREE_OPERAND (cfun->nonlocal_goto_save_area, 0) == var)
cfun->nonlocal_goto_save_area = NULL;
+ /* Release any default def associated with var. */
+ if ((def = ssa_default_def (cfun, var)) != NULL_TREE)
+ {
+ set_ssa_default_def (cfun, var, NULL_TREE);
+ release_ssa_name (def);
+ }
continue;
}
}