diff options
author | Joost VandeVondele <vondele@gcc.gnu.org> | 2015-10-19 10:24:37 +0000 |
---|---|---|
committer | Joost VandeVondele <vondele@gcc.gnu.org> | 2015-10-19 10:24:37 +0000 |
commit | 787da5fdbfc9e126d42436959df0f1507f1a9c13 (patch) | |
tree | 29da81662086457f8b063de69a5914e50c81d499 /gcc/cgraphunit.c | |
parent | 9c99fe750c477ab4408f48d8df2cd186307159ff (diff) | |
download | gcc-787da5fdbfc9e126d42436959df0f1507f1a9c13.zip gcc-787da5fdbfc9e126d42436959df0f1507f1a9c13.tar.gz gcc-787da5fdbfc9e126d42436959df0f1507f1a9c13.tar.bz2 |
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.
From-SVN: r228965
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 04a4d3f..0b0c0f4 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) |