Commit c52da5f7 by Richard Biener Committed by Richard Biener

re PR tree-optimization/57330 (ICE: verify_gimple failed -O3 [tree-cfg.c:4792])

2013-05-21  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/57330
	* cgraph.c (cgraph_redirect_edge_call_stmt_to_callee): Properly
	preserve the call stmts fntype.

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

From-SVN: r199139
parent bf5f6aa9
2013-05-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/57330
* cgraph.c (cgraph_redirect_edge_call_stmt_to_callee): Properly
preserve the call stmts fntype.
2013-05-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/57303
* tree-ssa-sink.c (statement_sink_location): Improve killing
stmt detection and properly handle self-assignments.
......
......@@ -1068,6 +1068,7 @@ cgraph_redirect_edge_call_stmt_to_callee (struct cgraph_edge *e)
= gimple_call_copy_skip_args (e->call_stmt,
e->callee->clone.combined_args_to_skip);
gimple_call_set_fndecl (new_stmt, e->callee->symbol.decl);
gimple_call_set_fntype (new_stmt, gimple_call_fntype (e->call_stmt));
if (gimple_vdef (new_stmt)
&& TREE_CODE (gimple_vdef (new_stmt)) == SSA_NAME)
......
2013-05-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/57330
* gcc.dg/torture/pr57330.c: New testcase.
2013-05-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/57303
* gcc.dg/torture/pr57303.c: New testcase.
......
/* { dg-do compile } */
void foo (int a)
{}
void *a;
void bar ()
{
void **( *b ) ( ) = (void**(*)()) foo;
a = b (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