Commit 7ad8c4bf by Per Bothner

function.c (lookup_static_chain): Check for a static chain using FUNCTION_NEEDS_STATIC_CHAIN.

* function.c (lookup_static_chain):  Check for a static chain
using FUNCTION_NEEDS_STATIC_CHAIN.
(init_function_start):  Set current_function_needs_context depending
on FUNCTION_NEEDS_STATIC_CHAIN rather than decl_function_context.

From-SVN: r9096
parent 7c38c3ad
...@@ -4246,8 +4246,14 @@ rtx ...@@ -4246,8 +4246,14 @@ rtx
lookup_static_chain (decl) lookup_static_chain (decl)
tree decl; tree decl;
{ {
tree context = decl_function_context (decl); tree context, link;
tree link;
if (TREE_CODE (decl) == FUNCTION_DECL
? ! FUNCTION_NEEDS_STATIC_CHAIN (decl)
: ! FUNCTION_NEEDS_STATIC_CHAIN (current_function_decl))
return 0;
context = decl_function_context (decl);
if (context == 0) if (context == 0)
return 0; return 0;
...@@ -4707,7 +4713,7 @@ init_function_start (subr, filename, line) ...@@ -4707,7 +4713,7 @@ init_function_start (subr, filename, line)
/* Nonzero if this is a nested function that uses a static chain. */ /* Nonzero if this is a nested function that uses a static chain. */
current_function_needs_context current_function_needs_context
= (decl_function_context (current_function_decl) != 0); = FUNCTION_NEEDS_STATIC_CHAIN (current_function_decl);
/* Set if a call to setjmp is seen. */ /* Set if a call to setjmp is seen. */
current_function_calls_setjmp = 0; current_function_calls_setjmp = 0;
......
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