* [PATCH] Fix PR ipa/65380
@ 2015-03-19 17:30 Martin Liška
0 siblings, 0 replies; only message in thread
From: Martin Liška @ 2015-03-19 17:30 UTC (permalink / raw)
To: GCC Patches; +Cc: hubicka >> Jan Hubicka
[-- Attachment #1: Type: text/plain, Size: 160 bytes --]
Hello.
This is fix for the issue as introduced by Honza. I've just finished testing on x86_64-linux-pc and
the patch is pre-approved by Honza.
Thanks,
Martin
[-- Attachment #2: 0001-Fix-PR-ipa-65380.patch --]
[-- Type: text/x-patch, Size: 1383 bytes --]
From f3c845d74b7a1edbbba9ecefa081feb58700d515 Mon Sep 17 00:00:00 2001
From: mliska <mliska@suse.cz>
Date: Thu, 19 Mar 2015 10:52:44 +0100
Subject: [PATCH] Fix PR ipa/65380.
gcc/ChangeLog:
2015-03-19 Jan Hubicka <hubicka@ucw.cz>
PR ipa/65380
* ipa-icf.c (sem_function::merge): Do not merge DECL_EXTERNAL symbols.
(sem_variable::merge): Likewise.
---
gcc/ipa-icf.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index f68d23c..360cf17 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -814,6 +814,13 @@ sem_function::merge (sem_item *alias_item)
bool original_address_matters = original->address_matters_p ();
bool alias_address_matters = alias->address_matters_p ();
+ if (DECL_EXTERNAL (alias->decl))
+ {
+ if (dump_file)
+ fprintf (dump_file, "Not unifying; alias is external.\n\n");
+ return false;
+ }
+
if (DECL_NO_INLINE_WARNING_P (original->decl)
!= DECL_NO_INLINE_WARNING_P (alias->decl))
{
@@ -1776,6 +1783,13 @@ sem_variable::merge (sem_item *alias_item)
return false;
}
+ if (DECL_EXTERNAL (alias_item->decl))
+ {
+ if (dump_file)
+ fprintf (dump_file, "Not unifying; alias is external.\n\n");
+ return false;
+ }
+
sem_variable *alias_var = static_cast<sem_variable *> (alias_item);
varpool_node *original = get_node ();
--
2.1.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-03-19 17:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-19 17:30 [PATCH] Fix PR ipa/65380 Martin Liška
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).