diff options
author | Jan Hubicka <jh@suse.cz> | 2011-03-04 19:49:23 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2011-03-04 18:49:23 +0000 |
commit | 87e7b310b3ddd203c446233d1517358e3708d9d7 (patch) | |
tree | a02cdefa6ac453edbd6d7e2b499c42469f9df485 /gcc/cp/method.c | |
parent | d9c642462049486d1dbf560686723313193baf43 (diff) | |
download | gcc-87e7b310b3ddd203c446233d1517358e3708d9d7.zip gcc-87e7b310b3ddd203c446233d1517358e3708d9d7.tar.gz gcc-87e7b310b3ddd203c446233d1517358e3708d9d7.tar.bz2 |
re PR lto/47497 (SPEC CPU 2006 failed to link with LTO -fuse-linker-plugin -fwhole-program)
PR lto/47497
* lto-symtab.c (lto_cgraph_replace_node): Do not set thunk.alias.
(lto_symtab_merge_cgraph_nodes_1): Update thunk.alias pointers here.
* cgraph.h (cgraph_same_body_alias, cgraph_add_thunk): Add node pointers.
* cgraph.c (cgraph_same_body_alias_1, cgraph_same_body_alias,
cgraph_add_thunk): Add node pointers.
* lto-cgraph.c (lto_output_node): Verify that thunks&aliases are
associated to right node.
(input_node): Update use of cgraph_same_body_alias
and cgraph_add_thunk.
* optimize.c (maybe_clone_body): Update call of cgraph_same_body_alias
and cgraph_add_thunk.
* method.c (make_alias_for_thunk, use_thunk): Likewise.
* mangle.c (mangle_decl): Likewise.
From-SVN: r170682
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r-- | gcc/cp/method.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 47f1808..a4c2dd1 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -259,7 +259,8 @@ make_alias_for_thunk (tree function) if (!flag_syntax_only) { - struct cgraph_node *aliasn = cgraph_same_body_alias (alias, function); + struct cgraph_node *aliasn = cgraph_same_body_alias (cgraph_node (function), + alias, function); DECL_ASSEMBLER_NAME (function); gcc_assert (aliasn != NULL); } @@ -376,7 +377,7 @@ use_thunk (tree thunk_fndecl, bool emit_p) a = nreverse (t); DECL_ARGUMENTS (thunk_fndecl) = a; TREE_ASM_WRITTEN (thunk_fndecl) = 1; - cgraph_add_thunk (thunk_fndecl, function, + cgraph_add_thunk (cgraph_node (function), thunk_fndecl, function, this_adjusting, fixed_offset, virtual_value, virtual_offset, alias); |