/* Mark as non-local and addressable. */
DECL_NONLOCAL (exp) = 1;
+ if (DECL_NO_STATIC_CHAIN (current_function_decl))
+ abort ();
mark_addressable (exp);
if (GET_CODE (DECL_RTL (exp)) != MEM)
abort ();
/* Are we taking the address of a nested function? */
if (TREE_CODE (TREE_OPERAND (exp, 0)) == FUNCTION_DECL
- && decl_function_context (TREE_OPERAND (exp, 0)) != 0)
+ && decl_function_context (TREE_OPERAND (exp, 0)) != 0
+ && ! DECL_NO_STATIC_CHAIN (TREE_OPERAND (exp, 0)))
{
op0 = trampoline_address (TREE_OPERAND (exp, 0));
op0 = force_operand (op0, target);
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.
/* 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;