This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: loop-iv bugfix
Zdenek Dvorak wrote:
Index: loop-iv.c
===================================================================
--- loop-iv.c (revision 122288)
+++ loop-iv.c (working copy)
@@ -1811,6 +1811,8 @@ simplify_using_initial_values (struct lo
FREE_REG_SET (altered);
return;
}
+ if (for_each_rtx (expr, altered_reg_used, altered))
+ return;
FREE_REG_SET (altered); is missing here.
I checked in the following as 122346. Bootstrapped & regression tested
on i686-linux; the first time there was a new failure:
FAIL: gfortran.dg/secnds.f -Os execution test
which went away after retesting, and is quite likely a different problem.
Bernd
--
This footer brought to you by insane German lawmakers.
Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
Registergericht Muenchen HRB 40368
Geschaeftsfuehrer Thomas Wessel, Vincent Roche, Joseph E. McDonough
Index: ChangeLog
===================================================================
--- ChangeLog (revision 122345)
+++ ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2007-02-27 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * loop-iv.c (simplify_using_initial_values): Fix oversight in previous
+ change; avoid a memory leak when returning early.
+
2007-02-26 Mark Mitchell <mark@codesourcery.com>
* c-decl.c (static_ctors): Move to c-common.c.
Index: loop-iv.c
===================================================================
--- loop-iv.c (revision 122345)
+++ loop-iv.c (working copy)
@@ -1812,7 +1812,10 @@ simplify_using_initial_values (struct lo
return;
}
if (for_each_rtx (expr, altered_reg_used, altered))
- return;
+ {
+ FREE_REG_SET (altered);
+ return;
+ }
}
if (!single_pred_p (e->src)