summaryrefslogtreecommitdiff
path: root/gcc/loop-iv.c
diff options
context:
space:
mode:
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-26 23:42:43 +0000
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-26 23:42:43 +0000
commit9676249d298984b3456a5efbc44e4c9b466b37e8 (patch)
tree7636997570cf6019dfd91081e030f78ab95d8482 /gcc/loop-iv.c
parentae0de0b55434a70e6bf7e37b9416cdca026e67b5 (diff)
downloadgcc-9676249d298984b3456a5efbc44e4c9b466b37e8.tar.gz
* loop-iv.c (simplify_using_initial_values): Fix oversight in previous
change; avoid a memory leak when returning early. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122346 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-iv.c')
-rw-r--r--gcc/loop-iv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c
index 21005d3ff51..00c82943642 100644
--- a/gcc/loop-iv.c
+++ b/gcc/loop-iv.c
@@ -1812,7 +1812,10 @@ simplify_using_initial_values (struct loop *loop, enum rtx_code op, rtx *expr)
return;
}
if (for_each_rtx (expr, altered_reg_used, altered))
- return;
+ {
+ FREE_REG_SET (altered);
+ return;
+ }
}
if (!single_pred_p (e->src)