Commit 39b0dce7 by Jason Merrill Committed by Jason Merrill

calls.c (expand_call): Use get_callee_fndecl.

        * calls.c (expand_call): Use get_callee_fndecl.

        * print-tree.c (print_node): Print the chain of an _EXPR.

From-SVN: r33426
parent 89a75b6d
2000-04-26 Jason Merrill <jason@casey.cygnus.com>
* calls.c (expand_call): Use get_callee_fndecl.
* print-tree.c (print_node): Print the chain of an _EXPR.
Tue Apr 25 16:16:04 2000 Andrew MacLeod <amacleod@cygnus.com> Tue Apr 25 16:16:04 2000 Andrew MacLeod <amacleod@cygnus.com>
Jim Wilson <wilson@cygnus.com> Jim Wilson <wilson@cygnus.com>
Andrew Haley <aph@cygnus.com> Andrew Haley <aph@cygnus.com>
......
...@@ -1982,13 +1982,8 @@ expand_call (exp, target, ignore) ...@@ -1982,13 +1982,8 @@ expand_call (exp, target, ignore)
/* See if we can find a DECL-node for the actual function. /* See if we can find a DECL-node for the actual function.
As a result, decide whether this is a call to an integrable function. */ As a result, decide whether this is a call to an integrable function. */
p = TREE_OPERAND (exp, 0); fndecl = get_callee_fndecl (exp);
if (TREE_CODE (p) == ADDR_EXPR) if (fndecl)
{
fndecl = TREE_OPERAND (p, 0);
if (TREE_CODE (fndecl) != FUNCTION_DECL)
fndecl = 0;
else
{ {
if (!flag_no_inline if (!flag_no_inline
&& fndecl != current_function_decl && fndecl != current_function_decl
...@@ -2014,12 +2009,14 @@ expand_call (exp, target, ignore) ...@@ -2014,12 +2009,14 @@ expand_call (exp, target, ignore)
flags |= flags_from_decl_or_type (fndecl); flags |= flags_from_decl_or_type (fndecl);
} }
}
/* If we don't have specific function to call, see if we have a /* If we don't have specific function to call, see if we have a
attributes set in the type. */ attributes set in the type. */
if (fndecl == 0) else
{
p = TREE_OPERAND (exp, 0);
flags |= flags_from_decl_or_type (TREE_TYPE (TREE_TYPE (p))); flags |= flags_from_decl_or_type (TREE_TYPE (TREE_TYPE (p)));
}
#ifdef REG_PARM_STACK_SPACE #ifdef REG_PARM_STACK_SPACE
#ifdef MAYBE_REG_PARM_STACK_SPACE #ifdef MAYBE_REG_PARM_STACK_SPACE
......
...@@ -613,6 +613,7 @@ print_node (file, prefix, node, indent) ...@@ -613,6 +613,7 @@ print_node (file, prefix, node, indent)
EXPR_WFL_FILENAME (node) : "(no file info)"), EXPR_WFL_FILENAME (node) : "(no file info)"),
EXPR_WFL_LINENO (node), EXPR_WFL_COLNO (node)); EXPR_WFL_LINENO (node), EXPR_WFL_COLNO (node));
} }
print_node (file, "chain", BLOCK_CHAIN (node), indent + 4);
break; break;
case 'c': case 'c':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment