This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Call maybe_cleanup_or_replace_eh_stmt unconditionally in replace_uses_by (PR tree-optimization/51576)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 16 Dec 2011 16:28:09 +0100
- Subject: [committed] Call maybe_cleanup_or_replace_eh_stmt unconditionally in replace_uses_by (PR tree-optimization/51576)
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
Bootstrap failed with go enabled at least on i686-linux for the last day
or so, some changes in libgo crypto apparently started triggering a
recently introduced problem in replace_uses_by. fold_stmt isn't the
only way a stmt can be changed by replace_uses_by, in the sha1.go
case replace_exp changed *tmp_8[i_10] = something; which because
of -fnon-call-exceptions was considered stmt_could_throw_p into
*tmp_8[0] = something; which can't throw, but maybe_clean_or_replace_eh_stmt
would be called only if fold_stmt returned non-zero.
Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
committed to trunk as obvious.
2011-12-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/51576
* tree-cfg.c (replace_uses_by): Call maybe_clean_or_replace_eh_stmt
even if fold_stmt didn't change anything.
--- gcc/tree-cfg.c.jj 2011-12-15 08:06:54.000000000 +0100
+++ gcc/tree-cfg.c 2011-12-16 12:10:00.350503019 +0100
@@ -1625,10 +1625,9 @@ replace_uses_by (tree name, tree val)
}
if (fold_stmt (&gsi))
- {
- stmt = gsi_stmt (gsi);
- maybe_clean_or_replace_eh_stmt (orig_stmt, stmt);
- }
+ stmt = gsi_stmt (gsi);
+
+ maybe_clean_or_replace_eh_stmt (orig_stmt, stmt);
update_stmt (stmt);
}
Jakub