summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-operands.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-operands.c')
-rw-r--r--gcc/tree-ssa-operands.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index d1d5a01cb58..2ff090ea935 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -409,9 +409,10 @@ finalize_ssa_uses (struct function *fn, gimple stmt)
/* If there is anything in the old list, free it. */
if (old_ops)
{
- for (ptr = old_ops; ptr; ptr = ptr->next)
+ for (ptr = old_ops; ptr->next; ptr = ptr->next)
delink_imm_use (USE_OP_PTR (ptr));
- old_ops->next = gimple_ssa_operands (fn)->free_uses;
+ delink_imm_use (USE_OP_PTR (ptr));
+ ptr->next = gimple_ssa_operands (fn)->free_uses;
gimple_ssa_operands (fn)->free_uses = old_ops;
}