diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2015-02-11 20:11:47 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-02-11 19:11:47 +0000 |
commit | d3f2e41eae66b3699aaa6e2bfc4ce5b86cedd37e (patch) | |
tree | 8ab6d8436aa96eaf64d3698bb24df0eaba1b0f19 /gcc/ipa.c | |
parent | 0a7d7e09c8e8aa2c79479e48bd4fee31dd0fe532 (diff) | |
download | gcc-d3f2e41eae66b3699aaa6e2bfc4ce5b86cedd37e.zip gcc-d3f2e41eae66b3699aaa6e2bfc4ce5b86cedd37e.tar.gz gcc-d3f2e41eae66b3699aaa6e2bfc4ce5b86cedd37e.tar.bz2 |
ipa.c (symbol_table::remove_unreachable_nodes): Avoid releasing bodies of thunks; comment on why.
* ipa.c (symbol_table::remove_unreachable_nodes): Avoid releasing
bodies of thunks; comment on why.
* symtab.c (symtab_node::get_partitioning_class): Aliases of extern
symbols are extern.
From-SVN: r220630
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r-- | gcc/ipa.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -537,7 +537,13 @@ symbol_table::remove_unreachable_nodes (FILE *file) /* If node is unreachable, remove its body. */ else if (!reachable.contains (node)) { - if (!body_needed_for_clonning.contains (node->decl)) + /* We keep definitions of thunks and aliases in the boundary so + we can walk to the ultimate alias targets and function symbols + reliably. */ + if (node->alias || node->thunk.thunk_p) + ; + else if (!body_needed_for_clonning.contains (node->decl) + && !node->alias && !node->thunk.thunk_p) node->release_body (); else if (!node->clone_of) gcc_assert (in_lto_p || DECL_RESULT (node->decl)); |