diff options
author | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-02-28 23:06:03 +0000 |
---|---|---|
committer | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-02-28 23:06:03 +0000 |
commit | c932471aa2453cc433c74ed3a5ae84b72635cdf2 (patch) | |
tree | 382aa88e35bf7e0e24823af2c79f971f265b1eab /gcc/function.c | |
parent | 49fc63a3555a0df15d6fa5c9c69b8e9a190a6ed0 (diff) | |
download | gcc-c932471aa2453cc433c74ed3a5ae84b72635cdf2.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9096 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/function.c b/gcc/function.c index 4ee042b373b..edd2bed6113 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -4246,12 +4246,18 @@ rtx lookup_static_chain (decl) tree decl; { - tree context = decl_function_context (decl); - tree link; + tree context, link; - if (context == 0) + 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) + return 0; + /* We treat inline_function_decl as an alias for the current function because that is the inline function whose vars, types, etc. are being merged into the current function. @@ -4707,7 +4713,7 @@ init_function_start (subr, filename, line) /* Nonzero if this is a nested function that uses a static chain. */ 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. */ current_function_calls_setjmp = 0; |