diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2010-05-31 11:43:31 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2010-05-31 11:43:31 +0000 |
commit | c5d01958a7b919d0407e8982d70e52fafa8588d2 (patch) | |
tree | 8cfca062d11d0ba0c64fbcf7479cc62376f5cff5 /gcc/cgraphunit.c | |
parent | a4c9bc1594bef333dc17be8d37625356e8b8c476 (diff) | |
download | gcc-c5d01958a7b919d0407e8982d70e52fafa8588d2.zip gcc-c5d01958a7b919d0407e8982d70e52fafa8588d2.tar.gz gcc-c5d01958a7b919d0407e8982d70e52fafa8588d2.tar.bz2 |
cgraphunit.c (cgraph_decide_is_function_needed): Really return false for nested functions in non-optimized compilation.
* cgraphunit.c (cgraph_decide_is_function_needed): Really return false
for nested functions in non-optimized compilation.
From-SVN: r160068
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 3dfbc92..1d5ed0d 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -352,13 +352,15 @@ cgraph_decide_is_function_needed (struct cgraph_node *node, tree decl) When not optimizing, also output the static functions. (see PR24561), but don't do so for always_inline functions, functions - declared inline and nested functions. These was optimized out + declared inline and nested functions. These were optimized out in the original implementation and it is unclear whether we want to change the behavior here. */ if (((TREE_PUBLIC (decl) - || (!optimize && !node->local.disregard_inline_limits + || (!optimize + && !node->local.disregard_inline_limits && !DECL_DECLARED_INLINE_P (decl) - && !node->origin)) + && !(DECL_CONTEXT (decl) + && TREE_CODE (DECL_CONTEXT (decl)) == FUNCTION_DECL))) && !flag_whole_program && !flag_lto && !flag_whopr) |