From: Richard Guenther Date: Mon, 5 Sep 2011 10:31:04 +0000 (+0000) Subject: tree-cfg.c (replace_uses_by): Use fold_stmt, not fold_stmt_inplace. X-Git-Tag: releases/gcc-4.7.0~3967 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1ab3876d2f2872741a554847a8ca503f58f430c;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ab05faa1d03e..0f9280245306 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 62e2da0c12f5..20feff91f727 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);