aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2004-11-03 19:55:30 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2004-11-03 11:55:30 -0800
commit269b75261a0652b4c1d3a495ba0071941e344604 (patch)
tree72ffe654f75f3c4c1d92b5e65f99d4e8e71bb917 /gcc/tree.c
parentb00e4c238b56689ec1e81a647a0147bf9ff79306 (diff)
downloadgcc-269b75261a0652b4c1d3a495ba0071941e344604.zip
gcc-269b75261a0652b4c1d3a495ba0071941e344604.tar.gz
gcc-269b75261a0652b4c1d3a495ba0071941e344604.tar.bz2
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
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 1af25cb..3e40c2e 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -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))