aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-nested.c
diff options
context:
space:
mode:
authorrguenth <>2008-08-09 16:28:39 +0000
committerrguenth <>2008-08-09 16:28:39 +0000
commit2a9814d61b537de3813ef6d733e67f6f5356fe74 (patch)
treee96c21c1520a969a3ed3dd84fdd1dadfb5821f86 /gcc/tree-nested.c
parent50898d0f6f024c3f3c58de98cf495772a7dac7c1 (diff)
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.
Diffstat (limited to 'gcc/tree-nested.c')
-rw-r--r--gcc/tree-nested.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c
index 8f4ab047ae9..cfa1dd4b1ee 100644
--- a/gcc/tree-nested.c
+++ b/gcc/tree-nested.c
@@ -363,8 +363,7 @@ init_tmp_var_with_call (struct nesting_info *info, gimple_stmt_iterator *gsi,
{
tree t;
- t = create_tmp_var_for (info, TREE_TYPE (TREE_TYPE (gimple_call_fn (call))),
- NULL);
+ t = create_tmp_var_for (info, gimple_call_return_type (call), NULL);
gimple_call_set_lhs (call, t);
if (! gsi_end_p (*gsi))
gimple_set_location (call, gimple_location (gsi_stmt (*gsi)));
@@ -1851,8 +1850,8 @@ convert_gimple_call (gimple_stmt_iterator *gsi, bool *handled_ops_p,
switch (gimple_code (stmt))
{
case GIMPLE_CALL:
- decl = gimple_call_fn (stmt);
- if (TREE_CODE (decl) != FUNCTION_DECL)
+ decl = gimple_call_fndecl (stmt);
+ if (!decl)
break;
target_context = decl_function_context (decl);
if (target_context && !DECL_NO_STATIC_CHAIN (decl))