diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2004-11-03 19:55:30 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2004-11-03 11:55:30 -0800 |
commit | 269b75261a0652b4c1d3a495ba0071941e344604 (patch) | |
tree | 72ffe654f75f3c4c1d92b5e65f99d4e8e71bb917 /gcc/tree.c | |
parent | b00e4c238b56689ec1e81a647a0147bf9ff79306 (diff) | |
download | gcc-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.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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)) |