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
This commit is contained in:
parent
6e548df501
commit
a135b1c41c
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
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));
|
||||
|
|
Loading…
Reference in New Issue