tree-ssa-operands.c (finalize_ssa_uses): Properly put released operands on the free...
authorRichard Biener <rguenther@suse.de>
Mon, 10 Nov 2014 15:46:23 +0000 (15:46 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 10 Nov 2014 15:46:23 +0000 (15:46 +0000)
2014-11-10  Richard Biener  <rguenther@suse.de>

* tree-ssa-operands.c (finalize_ssa_uses): Properly put
released operands on the free list.

From-SVN: r217291

gcc/ChangeLog
gcc/tree-ssa-operands.c

index 784c57a9b75e1da511691efc337a27513ffdbfb3..c49af15ca6bae0750fff4b976f56819badd3bba2 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-10  Richard Biener  <rguenther@suse.de>
+
+       * tree-ssa-operands.c (finalize_ssa_uses): Properly put
+       released operands on the free list.
+
 2014-11-10  Richard Biener  <rguenther@suse.de>
 
        * match.pd: Implement pattern from simplify_mult.
index d1d5a01cb581a2731a0663025c390ff0d7898d3b..2ff090ea9357c40b40b4aa9854346349a950e3c2 100644 (file)
@@ -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;
     }