aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2011-04-15 07:59:26 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2011-04-15 07:59:26 +0000
commitb25aa0e83fa9918bf5a95d28487fabe3c37f40f6 (patch)
tree4fa50a1e17d244c7d74039eaba96945170336718 /gcc
parent2aadeae27f225b6b0624a534de16106fb1d2a546 (diff)
downloadgcc-b25aa0e83fa9918bf5a95d28487fabe3c37f40f6.zip
gcc-b25aa0e83fa9918bf5a95d28487fabe3c37f40f6.tar.gz
gcc-b25aa0e83fa9918bf5a95d28487fabe3c37f40f6.tar.bz2
cfgexpand.c (expand_call_stmt): Convert the function type to the original one if this is not a builtin function.
* cfgexpand.c (expand_call_stmt): Convert the function type to the original one if this is not a builtin function. From-SVN: r172471
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/cfgexpand.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7808f4c..9051d43 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,7 +1,7 @@
-2011-04-14 Eric Botcazou <ebotcazou@adacore.com>
+2011-04-15 Eric Botcazou <ebotcazou@adacore.com>
- * cfgexpand.c (expand_call_stmt): Rematerialize the original function
- type if this is not a builtin function.
+ * cfgexpand.c (expand_call_stmt): Convert the function type to the
+ original one if this is not a builtin function.
2011-04-14 Jakub Jelinek <jakub@redhat.com>
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 45a6383..c2d71f4 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -1851,8 +1851,8 @@ expand_call_stmt (gimple stmt)
call is made may be different from the type of the function. */
if (!builtin_p)
CALL_EXPR_FN (exp)
- = fold_build1 (NOP_EXPR, build_pointer_type (gimple_call_fntype (stmt)),
- CALL_EXPR_FN (exp));
+ = fold_convert (build_pointer_type (gimple_call_fntype (stmt)),
+ CALL_EXPR_FN (exp));
TREE_TYPE (exp) = gimple_call_return_type (stmt);
CALL_EXPR_STATIC_CHAIN (exp) = gimple_call_chain (stmt);