summaryrefslogtreecommitdiff
path: root/gcc/tree-tailcall.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-tailcall.c')
-rw-r--r--gcc/tree-tailcall.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c
index 38daed9a786..10ae450886f 100644
--- a/gcc/tree-tailcall.c
+++ b/gcc/tree-tailcall.c
@@ -532,20 +532,22 @@ find_tail_calls (basic_block bb, struct tailcall **ret)
if (tmp_a)
{
+ tree type = TREE_TYPE (tmp_a);
if (a)
- a = fold_build2 (PLUS_EXPR, TREE_TYPE (tmp_a), a, tmp_a);
+ a = fold_build2 (PLUS_EXPR, type, fold_convert (type, a), tmp_a);
else
a = tmp_a;
}
if (tmp_m)
{
+ tree type = TREE_TYPE (tmp_m);
if (m)
- m = fold_build2 (MULT_EXPR, TREE_TYPE (tmp_m), m, tmp_m);
+ m = fold_build2 (MULT_EXPR, type, fold_convert (type, m), tmp_m);
else
m = tmp_m;
if (a)
- a = fold_build2 (MULT_EXPR, TREE_TYPE (tmp_m), a, tmp_m);
+ a = fold_build2 (MULT_EXPR, type, fold_convert (type, a), tmp_m);
}
}