summaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorvondele <vondele@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-19 10:24:37 +0000
committervondele <vondele@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-19 10:24:37 +0000
commitc071eedcfe0006760508441c11f8d64802d472e4 (patch)
tree29da81662086457f8b063de69a5914e50c81d499 /gcc/cgraphunit.c
parentcd5ad70a2a1af200e0087490d30a857a2fa24a36 (diff)
downloadgcc-c071eedcfe0006760508441c11f8d64802d472e4.tar.gz
Fix PR68002, add -fkeep-static-functions
gcc/ChangeLog: 2015-10-17 Joost VandeVondele <vondele@gnu.gcc.org> PR middle-end/68002 * common.opt (fkeep-static-functions): New option. * doc/invoke.texi: Document it. * cgraphunit.c (cgraph_node::finalize_function): Use it. gcc/testsuite/ChangeLog: 2015-10-17 Joost VandeVondele <vondele@gnu.gcc.org> PR middle-end/68002 * gcc.dg/PR68002.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228965 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 04a4d3f1100..0b0c0f4b6f4 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -451,7 +451,7 @@ cgraph_node::finalize_function (tree decl, bool no_collect)
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 ((!opt_for_fn (decl, optimize)
+ if (((!opt_for_fn (decl, optimize) || flag_keep_static_functions)
&& !node->cpp_implicit_alias
&& !DECL_DISREGARD_INLINE_LIMITS (decl)
&& !DECL_DECLARED_INLINE_P (decl)