Commit a6f30e66 by Richard Biener Committed by Richard Biener

re PR tree-optimization/57075 (verify_flow_info failed: control flow in the middle of basic block)

2013-04-29  Richard Biener  <rguenther@suse.de>

	PR middle-end/57075
	* tree-inline.c (copy_edges_for_bb): Still split the bbs,
	even if not adding abnormal edges for calls that can make
	abnormal gotos.

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

From-SVN: r198423
parent 0c2b2040
2013-04-29 Richard Biener <rguenther@suse.de>
PR middle-end/57075
* tree-inline.c (copy_edges_for_bb): Still split the bbs,
even if not adding abnormal edges for calls that can make
abnormal gotos.
2013-04-29 Richard Biener <rguenther@suse.de>
PR middle-end/57103
* tree-cfg.c (move_stmt_op): Fix condition under which to update
TREE_BLOCK.
......
2013-04-29 Richard Biener <rguenther@suse.de>
PR middle-end/57075
* gcc.dg/torture/pr57075.c: New testcase.
2013-04-29 Richard Biener <rguenther@suse.de>
PR middle-end/57103
* gcc.dg/autopar/pr57103.c: New testcase.
......
/* { dg-do compile } */
extern int baz (void) __attribute__ ((returns_twice));
int __attribute__ ((__leaf__))
foo (void)
{
return __builtin_printf ("$");
}
void
bar ()
{
foo ();
baz ();
}
......@@ -1923,11 +1923,7 @@ copy_edges_for_bb (basic_block bb, gcov_type count_scale, basic_block ret_bb,
into a COMPONENT_REF which doesn't. If the copy
can throw, the original could also throw. */
can_throw = stmt_can_throw_internal (copy_stmt);
/* If the call we inline cannot make abnormal goto do not add
additional abnormal edges but only retain those already present
in the original function body. */
nonlocal_goto
= can_make_abnormal_goto && stmt_can_make_abnormal_goto (copy_stmt);
nonlocal_goto = stmt_can_make_abnormal_goto (copy_stmt);
if (can_throw || nonlocal_goto)
{
......@@ -1955,6 +1951,10 @@ copy_edges_for_bb (basic_block bb, gcov_type count_scale, basic_block ret_bb,
else if (can_throw)
make_eh_edges (copy_stmt);
/* If the call we inline cannot make abnormal goto do not add
additional abnormal edges but only retain those already present
in the original function body. */
nonlocal_goto &= can_make_abnormal_goto;
if (nonlocal_goto)
make_abnormal_goto_edges (gimple_bb (copy_stmt), true);
......
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