aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-low.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-04-08 12:19:45 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-04-08 12:19:45 +0000
commit9bfc434b7aa052e8d9175d3eca8fc355618e6fab (patch)
tree77df3037e3807fabf488254798b809e577345502 /gcc/gimple-low.c
parent7c1f0b40206bed9fc4b62a04ca9f49c8b9cea4dc (diff)
downloadgcc-9bfc434b7aa052e8d9175d3eca8fc355618e6fab.zip
gcc-9bfc434b7aa052e8d9175d3eca8fc355618e6fab.tar.gz
gcc-9bfc434b7aa052e8d9175d3eca8fc355618e6fab.tar.bz2
gimple.h (gimple_call_fntype): New function.
2011-04-08 Richard Guenther <rguenther@suse.de> * gimple.h (gimple_call_fntype): New function. (gimple_call_return_type): Use it. * expr.c (expand_expr_real_1): Use gimple_call_fntype. * gimple-low.c (gimple_check_call_args): Likewise. * gimple.c (gimple_call_flags): Likewise. (gimple_call_arg_flags): Likewise. (gimple_call_return_flags): Likewise. * tree-cfg.c (verify_gimple_call): Likewise. (do_warn_unused_result): Likewise. * tree-ssa-ccp.c (ccp_fold_stmt): Likewise. * value-prof.c (gimple_ic_transform): Fix fndecl check. From-SVN: r172178
Diffstat (limited to 'gcc/gimple-low.c')
-rw-r--r--gcc/gimple-low.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c
index 9d77442..9968493 100644
--- a/gcc/gimple-low.c
+++ b/gcc/gimple-low.c
@@ -222,11 +222,10 @@ gimple_check_call_args (gimple stmt)
/* Get argument types for verification. */
fndecl = gimple_call_fndecl (stmt);
- parms = NULL_TREE;
if (fndecl)
parms = TYPE_ARG_TYPES (TREE_TYPE (fndecl));
- else if (POINTER_TYPE_P (TREE_TYPE (gimple_call_fn (stmt))))
- parms = TYPE_ARG_TYPES (TREE_TYPE (TREE_TYPE (gimple_call_fn (stmt))));
+ else
+ parms = TYPE_ARG_TYPES (gimple_call_fntype (stmt));
/* Verify if the type of the argument matches that of the function
declaration. If we cannot verify this or there is a mismatch,