Commit 00296d7f by Jakub Jelinek Committed by Jakub Jelinek

re PR middle-end/81207 (tree check fail in simplify_builtin_call)

	PR middle-end/81207
	* gimple-fold.c (replace_call_with_call_and_fold): Handle
	gimple_vuse copying separately from gimple_vdef copying.

	* gcc.c-torture/compile/pr81207.c: New test.

From-SVN: r249677
parent 0c418630
2017-06-27 Jakub Jelinek <jakub@redhat.com>
PR middle-end/81207
* gimple-fold.c (replace_call_with_call_and_fold): Handle
gimple_vuse copying separately from gimple_vdef copying.
2017-06-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* value-prof.c (free_hist): Remove call to memset and the enclosing if
condition.
gcc/ChangeLog:
2017-06-26 Jerome Lambourg <lambourg@adacore.com>
Olivier Hainque <hainque@adacore.com>
......
......@@ -607,9 +607,10 @@ replace_call_with_call_and_fold (gimple_stmt_iterator *gsi, gimple *repl)
&& TREE_CODE (gimple_vdef (stmt)) == SSA_NAME)
{
gimple_set_vdef (repl, gimple_vdef (stmt));
gimple_set_vuse (repl, gimple_vuse (stmt));
SSA_NAME_DEF_STMT (gimple_vdef (repl)) = repl;
}
if (gimple_vuse (stmt))
gimple_set_vuse (repl, gimple_vuse (stmt));
gsi_replace (gsi, repl, false);
fold_stmt (gsi);
}
......
2017-06-27 Jakub Jelinek <jakub@redhat.com>
PR middle-end/81207
* gcc.c-torture/compile/pr81207.c: New test.
2017-06-27 Marek Polacek <polacek@redhat.com>
PR bootstrap/81216
......
/* PR middle-end/81207 */
static const char *b[2] = { "'", "" };
int
foo (const char *d)
{
int e;
for (e = 0; b[e]; e++)
if (__builtin_strstr (d, b[e]))
return 1;
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment