diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-31 11:43:31 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-31 11:43:31 +0000 |
commit | 0f9238c09c46f4f8cd62821c231b4cfda5cca8c1 (patch) | |
tree | 8cfca062d11d0ba0c64fbcf7479cc62376f5cff5 /gcc/cgraphunit.c | |
parent | 9a7b938d92bed9f068038d1409e9b0a5e94ffc57 (diff) | |
download | gcc-0f9238c09c46f4f8cd62821c231b4cfda5cca8c1.tar.gz |
* cgraphunit.c (cgraph_decide_is_function_needed): Really return false
for nested functions in non-optimized compilation.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160068 138bc75d-0d04-0410-961f-82ee72b054a4
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 3dfbc927d13..1d5ed0d5ed8 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) |