Commit a135b1c4 by Richard Guenther Committed by Richard Biener

re PR tree-optimization/37433 (tree check: expected function_decl, have…

re PR tree-optimization/37433 (tree check: expected function_decl, have string_cst in ccp_fold, at tree-ssa-ccp.c:1050)

2008-09-09  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/37433
	* tree-ssa-ccp.c (ccp_fold): Properly guard folding of
	function calls.

	* gcc.c-torture/compile/pr37433.c: New testcase.

From-SVN: r140143
parent 6e548df5
2008-09-09 Richard Guenther <rguenther@suse.de>
PR tree-optimization/37433
* tree-ssa-ccp.c (ccp_fold): Properly guard folding of
function calls.
2008-09-09 Richard Guenther <rguenther@suse.de>
PR tree-optimization/37387
* tree-ssa-ifcombine.c (ifcombine_iforif): Convert the name
and bits to a common type.
......
2008-09-09 Richard Guenther <rguenther@suse.de>
PR tree-optimization/37433
* gcc.c-torture/compile/pr37433.c: New testcase.
2008-09-09 Richard Guenther <rguenther@suse.de>
PR tree-optimization/37387
* gcc.c-torture/compile/pr37387.c: New testcase.
......
int regex_subst(void)
{
const void *subst = "";
return (*(int (*)(int))subst) (0);
}
int foobar (void)
{
int x;
return (*(int (*)(void))&x) ();
}
......@@ -1047,6 +1047,7 @@ ccp_fold (gimple stmt)
fn = val->value;
}
if (TREE_CODE (fn) == ADDR_EXPR
&& TREE_CODE (TREE_OPERAND (fn, 0)) == FUNCTION_DECL
&& DECL_BUILT_IN (TREE_OPERAND (fn, 0)))
{
tree *args = XALLOCAVEC (tree, gimple_call_num_args (stmt));
......
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