From: Eric Botcazou Date: Fri, 15 Apr 2011 07:59:26 +0000 (+0000) Subject: cfgexpand.c (expand_call_stmt): Convert the function type to the original one if... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b25aa0e83fa9918bf5a95d28487fabe3c37f40f6;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7808f4cf13c..9051d430559 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,7 +1,7 @@ -2011-04-14 Eric Botcazou +2011-04-15 Eric Botcazou - * 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 diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 45a638356b1..c2d71f43bad 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);