aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r--gcc/gimple.c2
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;
}