re PR middle-end/18231 (Nested inline function not inlined)
2004-11-03 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/18231 * tree.c (staticp) <case FUNCTION_DECL>: Nested functions are static also. From-SVN: r90033
This commit is contained in:
parent
b00e4c238b
commit
269b75261a
2 changed files with 10 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-11-03 Andrew Pinski <pinskia@physics.uc.edu>
|
||||
|
||||
PR tree-opt/18231
|
||||
* tree.c (staticp) <case FUNCTION_DECL>: Nested functions are static
|
||||
also.
|
||||
|
||||
2004-11-03 Andrew MacLeod <amacleod@redhat.com>
|
||||
|
||||
PR tree-optimization/18270
|
||||
|
|
|
@ -1573,11 +1573,10 @@ staticp (tree arg)
|
|||
switch (TREE_CODE (arg))
|
||||
{
|
||||
case FUNCTION_DECL:
|
||||
/* Nested functions aren't static, since taking their address
|
||||
involves a trampoline. */
|
||||
return ((decl_function_context (arg) == 0 || DECL_NO_STATIC_CHAIN (arg))
|
||||
&& ! DECL_NON_ADDR_CONST_P (arg)
|
||||
? arg : NULL);
|
||||
/* Nested functions are static, even though taking their address will
|
||||
involve a trampoline as we unnest the nested function and create
|
||||
the trampoline on the tree level. */
|
||||
return arg;
|
||||
|
||||
case VAR_DECL:
|
||||
return ((TREE_STATIC (arg) || DECL_EXTERNAL (arg))
|
||||
|
|
Loading…
Add table
Reference in a new issue