Hello. Following patch add support for IPA ICF, where we miss support for a proper DECL_PT_UID update in situations where we merge variables.
Patch can bootstrap and no new regression is introduced for x86_64-linux-gnu. Ready for trunk? Thanks, Martin
>From 35ec4381940677e9491f28b7d83c8b0fbbc45d6c Mon Sep 17 00:00:00 2001 From: marxin <mli...@suse.cz> Date: Wed, 18 May 2016 10:07:04 +0200 Subject: [PATCH] Set DECL_PT_UID for merged variables in IPA ICF (PR70856). gcc/ChangeLog: 2016-05-18 Martin Liska <mli...@suse.cz> * ipa-icf.c (sem_variable::merge): Set DECL_PT_UID for merged variables. --- gcc/ipa-icf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index dda5cac..3c04b5a 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -2258,6 +2258,8 @@ sem_variable::merge (sem_item *alias_item) varpool_node::create_alias (alias_var->decl, decl); alias->resolve_alias (original); + if (DECL_PT_UID_SET_P (original->decl)) + SET_DECL_PT_UID (alias->decl, DECL_PT_UID (original->decl)); if (dump_file) fprintf (dump_file, "Unified; Variable alias has been created.\n\n"); -- 2.8.2