diff options
author | Richard Guenther <rguenther@suse.de> | 2008-09-09 10:06:54 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-09-09 10:06:54 +0000 |
commit | a135b1c41c63e75ad1b8d74345eca520e973e2f9 (patch) | |
tree | a02c315a092276000b54f52506607d0102e2325c /gcc/tree-ssa-ccp.c | |
parent | 6e548df501d6447f40d294f8fc01b7d8f3b72887 (diff) | |
download | gcc-a135b1c41c63e75ad1b8d74345eca520e973e2f9.tar.gz |
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
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 8f700c47be2..22626a53840 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -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)); |