Commit 75f0112f by Richard Biener Committed by Richard Biener

re PR tree-optimization/81203 (tail recursion: internal compiler error: verify_ssa failed)

2017-06-26  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81203
	* tree-tailcall.c (find_tail_calls): Do not move stmts into
	non-dominating BBs.

	* gcc.dg/torture/pr81203.c: New testcase.

From-SVN: r249644
parent 3e2becc4
2017-06-26 Richard Biener <rguenther@suse.de>
PR tree-optimization/81203
* tree-tailcall.c (find_tail_calls): Do not move stmts into
non-dominating BBs.
2017-06-26 Marek Polacek <polacek@redhat.com>
PR c/80116
......
2017-06-26 Richard Biener <rguenther@suse.de>
PR tree-optimization/81203
* gcc.dg/torture/pr81203.c: New testcase.
2017-06-26 Marek Polacek <polacek@redhat.com>
PR c/80116
......
/* { dg-do compile } */
int a;
int b()
{
int c, d;
if (a)
d = b();
return 1 + c + d;
}
......@@ -573,6 +573,11 @@ find_tail_calls (basic_block bb, struct tailcall **ret)
{
if (! tail_recursion)
return;
/* Do not deal with checking dominance, the real fix is to
do path isolation for the transform phase anyway, removing
the need to compute the accumulators with new stmts. */
if (abb != bb)
return;
for (unsigned opno = 1; opno < gimple_num_ops (stmt); ++opno)
{
tree op = gimple_op (stmt, opno);
......
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