This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH to fold_builtin
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 Aug 2003 23:25:03 -0400
- Subject: PATCH to fold_builtin
fold_builtin was failing to handle cases where the function address was
wrapped in a NOP. Fixed by using the same routine to get at the function
decl that we use elsewhere in the compiler.
Tested athlon-pc-linux-gnu, applied to tree-ssa. Currently testing on the
trunk.
2003-08-19 Jason Merrill <jason@redhat.com>
* builtins.c (fold_builtin): Use get_callee_fndecl.
*** ./builtins.c.~1~ Tue Aug 19 14:38:35 2003
--- ./builtins.c Tue Aug 19 17:07:44 2003
*************** fold_builtin_ceil (tree exp)
*** 5760,5766 ****
tree
fold_builtin (tree exp)
{
! tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
tree arglist = TREE_OPERAND (exp, 1);
tree type = TREE_TYPE (TREE_TYPE (fndecl));
--- 5760,5766 ----
tree
fold_builtin (tree exp)
{
! tree fndecl = get_callee_fndecl (exp);
tree arglist = TREE_OPERAND (exp, 1);
tree type = TREE_TYPE (TREE_TYPE (fndecl));