diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2015-02-28 23:46:22 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-02-28 22:46:22 +0000 |
commit | 412049de810dde0c4d97742678e6a36ca477aeda (patch) | |
tree | a3d83b5798a9df6d9df06e4222b0396d872c7ffa /gcc | |
parent | b7aa4a3ab319b307daf896c274557443593acbd5 (diff) | |
download | gcc-412049de810dde0c4d97742678e6a36ca477aeda.zip gcc-412049de810dde0c4d97742678e6a36ca477aeda.tar.gz gcc-412049de810dde0c4d97742678e6a36ca477aeda.tar.bz2 |
re PR bootstrap/65232 (bootstrap failure (ICE in change_symbol_block, at varasm.c:1230) on arm-linux-gnueabihf, in libstdc++ stage1)
PR ipa/65232
* ipa-icf.c (clear_decl_rtl): New function.
(sem_function::merge): Clear RTL before forming alias.
(sem_variable::merge): Clear RTL before forming alias.
From-SVN: r221078
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/ipa-icf.c | 17 |
2 files changed, 23 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2c8c9a5..db44c28 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2015-02-28 Jan Hubicka <hubicka@ucw.cz> + PR ipa/65232 + * ipa-icf.c (clear_decl_rtl): New function. + (sem_function::merge): Clear RTL before forming alias. + (sem_variable::merge): Clear RTL before forming alias. + +2015-02-28 Jan Hubicka <hubicka@ucw.cz> + PR ipa/65236 * cgraphunit.c (cgraph_node::expand_thunk): Enable return slot opt. diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index 5d50b6f..ef7c855 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -632,7 +632,7 @@ set_local (cgraph_node *node, void *data) return false; } -/* TREE_ADDRESSABLE of NODE to true if DATA is non-NULL. +/* TREE_ADDRESSABLE of NODE to true. Helper for call_for_symbol_thunks_and_aliases. */ static bool @@ -642,6 +642,16 @@ set_addressable (varpool_node *node, void *) return false; } +/* Clear DECL_RTL of NODE. + Helper for call_for_symbol_thunks_and_aliases. */ + +static bool +clear_decl_rtl (symtab_node *node, void *) +{ + SET_DECL_RTL (node->decl, NULL); + return false; +} + /* Redirect all callers of N and its aliases to TO. Remove aliases if possible. Return number of redirections made. */ @@ -893,6 +903,9 @@ sem_function::merge (sem_item *alias_item) ipa_merge_profiles (original, alias); alias->release_body (true); alias->reset (); + /* Notice global symbol possibly produced RTL. */ + ((symtab_node *)alias)->call_for_symbol_and_aliases (clear_decl_rtl, + NULL, true); /* Create the alias. */ cgraph_node::create_alias (alias_func->decl, decl); @@ -1512,6 +1525,8 @@ sem_variable::merge (sem_item *alias_item) alias->analyzed = false; DECL_INITIAL (alias->decl) = NULL; + ((symtab_node *)alias)->call_for_symbol_and_aliases (clear_decl_rtl, + NULL, true); alias->need_bounds_init = false; alias->remove_all_references (); if (TREE_ADDRESSABLE (alias->decl)) |