diff options
author | Jason Merrill <merrill@gnu.org> | 1996-03-05 22:16:33 +0000 |
---|---|---|
committer | Jason Merrill <merrill@gnu.org> | 1996-03-05 22:16:33 +0000 |
commit | 38ee6ed95695e80b1669aea25f9cab12996d00e7 (patch) | |
tree | 5dac2507bbc99be1baffaabf877fe301b37600e9 /gcc/function.c | |
parent | e115e436ee2b1cac30275826e7bfa6221fa0efa5 (diff) | |
download | gcc-38ee6ed95695e80b1669aea25f9cab12996d00e7.zip gcc-38ee6ed95695e80b1669aea25f9cab12996d00e7.tar.gz gcc-38ee6ed95695e80b1669aea25f9cab12996d00e7.tar.bz2 |
(expand_expr, case *_DECL): If we make a non-local reference from a function with DECL_NO_STATIC_CHAIN set, abort.
(expand_expr, case *_DECL): If we make a non-local
reference from a function with DECL_NO_STATIC_CHAIN set, abort.
(expand_expr, case ADDR_EXPR): We don't need a trampoline for a
function with DECL_NO_STATIC_CHAIN set.
From-SVN: r11461
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/function.c b/gcc/function.c index cf94c77..bdbfa54 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -4379,9 +4379,10 @@ lookup_static_chain (decl) tree context = decl_function_context (decl); tree link; - if (context == 0) + if (context == 0 + || (TREE_CODE (decl) == FUNCTION_DECL && DECL_NO_STATIC_CHAIN (decl))) 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. @@ -4851,7 +4852,8 @@ 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); + = (decl_function_context (current_function_decl) != 0 + && ! DECL_NO_STATIC_CHAIN (current_function_decl)); /* Set if a call to setjmp is seen. */ current_function_calls_setjmp = 0; |