This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR ipa/65059
- From: Martin LiÅka <mliska at suse dot cz>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Jan Hubicka <hubicka at ucw dot cz>
- Date: Mon, 16 Feb 2015 13:20:48 +0100
- Subject: [PATCH] Fix PR ipa/65059
- Authentication-results: sourceware.org; auth=none
Hello.
This patch is fix which was attached by Honza to the PR. Patch was tested on x86_64-linux-pc and no new
regression is introduced. Patch is pre-approved by Honza and I'm going to install the patch.
Martin
>From cfe7bd6b57cc6e0768fd72d27a7b222ab1136b32 Mon Sep 17 00:00:00 2001
From: mliska <mliska@suse.cz>
Date: Mon, 16 Feb 2015 11:37:29 +0100
Subject: [PATCH] Fix PR ipa/65059.
gcc/ChangeLog:
2015-02-16 Jan Hubicka <hubicka@ucw.cz>
PR ipa/65059
* ipa-comdats.c (ipa_comdats): Do not categorize thunks to
external functions.
---
gcc/ipa-comdats.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/ipa-comdats.c b/gcc/ipa-comdats.c
index ad5945f..9f43f29 100644
--- a/gcc/ipa-comdats.c
+++ b/gcc/ipa-comdats.c
@@ -328,9 +328,14 @@ ipa_comdats (void)
FOR_EACH_DEFINED_SYMBOL (symbol)
{
+ struct cgraph_node *fun;
symbol->aux = NULL;
if (!symbol->get_comdat_group ()
&& !symbol->alias
+ /* Thunks to external functions do not need to be categorized. */
+ && (!(fun = dyn_cast <cgraph_node *> (symbol))
+ || !fun->thunk.thunk_p
+ || fun->function_symbol ()->definition)
&& symbol->real_symbol_p ())
{
tree *val = map.get (symbol);
--
2.1.2