From e1ab3876d2f2872741a554847a8ca503f58f430c Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Mon, 5 Sep 2011 10:31:04 +0000 Subject: [PATCH] tree-cfg.c (replace_uses_by): Use fold_stmt, not fold_stmt_inplace. 2011-09-05 Richard Guenther * tree-cfg.c (replace_uses_by): Use fold_stmt, not fold_stmt_inplace. From-SVN: r178527 --- gcc/ChangeLog | 4 ++++ gcc/tree-cfg.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ab05faa1d03..0f928024530 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2011-09-05 Richard Guenther + + * tree-cfg.c (replace_uses_by): Use fold_stmt, not fold_stmt_inplace. + 2011-09-05 Richard Guenther * stor-layout.c (layout_type): Use size_binop for array size diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 62e2da0c12f..20feff91f72 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -1566,9 +1566,11 @@ replace_uses_by (tree name, tree val) if (gimple_code (stmt) != GIMPLE_PHI) { + gimple_stmt_iterator gsi = gsi_for_stmt (stmt); size_t i; - fold_stmt_inplace (stmt); + fold_stmt (&gsi); + stmt = gsi_stmt (gsi); if (cfgcleanup_altered_bbs && !is_gimple_debug (stmt)) bitmap_set_bit (cfgcleanup_altered_bbs, gimple_bb (stmt)->index); -- 2.30.2