(staticp): Check DECL_NO_STATIC_CHAIN on nested functions.

From-SVN: r11462
This commit is contained in:
Jason Merrill 1996-03-05 22:16:33 +00:00
parent 38ee6ed956
commit 3e29c1a88c

View File

@ -2055,7 +2055,7 @@ staticp (arg)
case FUNCTION_DECL:
/* Nested functions aren't static, since taking their address
involves a trampoline. */
return decl_function_context (arg) == 0;
return decl_function_context (arg) == 0 || DECL_NO_STATIC_CHAIN (arg);
case VAR_DECL:
return TREE_STATIC (arg) || DECL_EXTERNAL (arg);