aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2015-02-09 21:45:04 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2015-02-09 20:45:04 +0000
commit106b54666459294e68b176e2f2e811e488158880 (patch)
treee5856920069ec77b403a8c8ae6d07a6d9dce0b86
parentb8ec1bd3298611c791737123a476a13c1eb9e219 (diff)
downloadgcc-106b54666459294e68b176e2f2e811e488158880.zip
gcc-106b54666459294e68b176e2f2e811e488158880.tar.gz
gcc-106b54666459294e68b176e2f2e811e488158880.tar.bz2
re PR ipa/63566 (i686 bootstrap fails: ICE RTL flag check: INSN_UID used with unexpected rtx code 'set' in INSN_UID, at rtl.h:1326)
PR ipa/63566 * ipa-icf.c (set_local): New function. (sem_function::merge): Use it. From-SVN: r220548
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/ipa-icf.c16
2 files changed, 18 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 445e9a9..5f7c621 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2015-02-08 Jan Hubicka <hubicka@ucw.cz>
+ PR ipa/63566
+ * ipa-icf.c (set_local): New function.
+ (sem_function::merge): Use it.
+
+2015-02-08 Jan Hubicka <hubicka@ucw.cz>
+
* ipa-devirt.c (odr_types_equivalent_p): Fix formating.
(add_type_duplicate): Fix comparison of BINFOs.
diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index d19ddc3..692946a 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -584,6 +584,16 @@ sem_function::equals_private (sem_item *item,
return result;
}
+/* Set LOCAL_P of NODE to true if DATA is non-NULL.
+ Helper for call_for_symbol_thunks_and_aliases. */
+
+static bool
+set_local (cgraph_node *node, void *data)
+{
+ node->local.local = data != NULL;
+ return false;
+}
+
/* Merges instance with an ALIAS_ITEM, where alias, thunk or redirection can
be applied. */
bool
@@ -743,10 +753,8 @@ sem_function::merge (sem_item *alias_item)
cgraph_node::create_alias (alias_func->decl, decl);
alias->resolve_alias (original);
- /* Workaround for PR63566 that forces equal calling convention
- to be used. */
- alias->local.local = false;
- original->local.local = false;
+ original->call_for_symbol_thunks_and_aliases
+ (set_local, (void *)(size_t) original->local_p (), true);
if (dump_file)
fprintf (dump_file, "Callgraph alias has been created.\n\n");