diff options
author | Richard Guenther <rguenther@suse.de> | 2008-08-09 17:28:39 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-08-09 17:28:39 +0000 |
commit | 7c9577becf922e261c901a1108ee0cb58aa73d58 (patch) | |
tree | e96c21c1520a969a3ed3dd84fdd1dadfb5821f86 /gcc/gimple.c | |
parent | 6cccc200142d9a9d1dbafa0d0a1d8ec2cb0b2c14 (diff) | |
download | gcc-7c9577becf922e261c901a1108ee0cb58aa73d58.zip gcc-7c9577becf922e261c901a1108ee0cb58aa73d58.tar.gz gcc-7c9577becf922e261c901a1108ee0cb58aa73d58.tar.bz2 |
gimple.c (gimple_build_call_1): Deal with FUNCTION_DECL fn.
2008-08-09 Richard Guenther <rguenther@suse.de>
* gimple.c (gimple_build_call_1): Deal with FUNCTION_DECL fn.
* gimple.h (gimple_call_fn): Adjust comment.
(gimple_call_set_fndecl): New function.
(gimple_call_fndecl): Adjust for GIMPLE_CALL no
longer having bare FUNCTION_DECL operand.
(gimple_call_return_type): Likewise.
* tree-cfg.c (verify_stmt): Verify function operand of a GIMPLE_CALL.
* value-prof.c (gimple_divmod_fixed_value): Do not emit labels.
(gimple_mod_pow2): Likewise.
(gimple_mod_subtract): Likewise.
(gimple_ic): Likewise.
(gimple_stringop_fixed_value): Likewise.
(gimple_indirect_call_to_profile): Fix for GIMPLE_CALL no
longer having bare FUNCTION_DECL operand.
* ipa-cp.c (ipcp_update_callgraph): Use gimple_call_set_fndecl.
* omp-low.c (optimize_omp_library_calls): Likewise.
* cgraphunit.c (update_call_expr): Likewise.
* tree-ssa-math-opts.c (execute_cse_reciprocals): Likewise.
(execute_convert_to_rsqrt): Likewise.
* cfgexpand.c (gimple_to_tree): Simplify.
(release_stmt_tree): Fix for GIMPLE_CALL no longer having
bare FUNCTION_DECL operand.
* tree-nested.c (init_tmp_var_with_call): Use gimple_call_return_type.
(convert_gimple_call): Use gimple_call_fndecl.
* c-common.c (c_warn_unused_result): Likewise.
* gcc.dg/tree-ssa/inline-2.c: New testcase.
From-SVN: r138907
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r-- | gcc/gimple.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c index 2d097c7..6e8971f 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -285,6 +285,8 @@ static inline gimple gimple_build_call_1 (tree fn, unsigned nargs) { gimple s = gimple_build_with_ops (GIMPLE_CALL, 0, nargs + 3); + if (TREE_CODE (fn) == FUNCTION_DECL) + fn = build_fold_addr_expr (fn); gimple_set_op (s, 1, fn); return s; } |