aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2011-05-31 16:15:17 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2011-05-31 14:15:17 +0000
commitb9e57365defa41307c888e8eabdff8099ab68887 (patch)
treefd069a429f6093d8222809c6eda3e12d2e21c6e6 /gcc
parente67e39c2b5d1cbd37d9d3cd8821794fe2d45b97b (diff)
downloadgcc-b9e57365defa41307c888e8eabdff8099ab68887.zip
gcc-b9e57365defa41307c888e8eabdff8099ab68887.tar.gz
gcc-b9e57365defa41307c888e8eabdff8099ab68887.tar.bz2
lto-symtab.c (lto_symtab_merge_cgraph_nodes): Merge alias decl of thunks.
* lto-symtab.c (lto_symtab_merge_cgraph_nodes): Merge alias decl of thunks. From-SVN: r174482
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/lto-symtab.c14
2 files changed, 14 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c416db5..86a288a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-31 Jan Hubicka <jh@suse.cz>
+
+ * lto-symtab.c (lto_symtab_merge_cgraph_nodes): Merge alias decl
+ of thunks.
+
2011-05-31 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/49235
diff --git a/gcc/lto-symtab.c b/gcc/lto-symtab.c
index 8dc10e8..af8106d 100644
--- a/gcc/lto-symtab.c
+++ b/gcc/lto-symtab.c
@@ -821,11 +821,15 @@ lto_symtab_merge_cgraph_nodes (void)
htab_traverse (lto_symtab_identifiers, lto_symtab_merge_cgraph_nodes_1, NULL);
for (node = cgraph_nodes; node; node = node->next)
- for (alias = node->same_body; alias; alias = next)
- {
- next = alias->next;
- alias->thunk.alias = lto_symtab_prevailing_decl (alias->thunk.alias);
- }
+ {
+ if (node->thunk.thunk_p)
+ node->thunk.alias = lto_symtab_prevailing_decl (node->thunk.alias);
+ for (alias = node->same_body; alias; alias = next)
+ {
+ next = alias->next;
+ alias->thunk.alias = lto_symtab_prevailing_decl (alias->thunk.alias);
+ }
+ }
}
/* Given the decl DECL, return the prevailing decl with the same name. */