aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 848b167..2c4404b 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -9909,7 +9909,9 @@ fold_ternary (tree expr)
&& TREE_CODE (TREE_OPERAND (op0, 0)) == FUNCTION_DECL
&& DECL_BUILT_IN (TREE_OPERAND (op0, 0)))
{
- tree tmp = fold_builtin (t, false);
+ tree fndecl = get_callee_fndecl (t);
+ tree arglist = TREE_OPERAND (t, 1);
+ tree tmp = fold_builtin (fndecl, arglist, false);
if (tmp)
return tmp;
}