diff options
author | Richard Guenther <rguenther@suse.de> | 2009-09-04 18:54:01 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-09-04 18:54:01 +0000 |
commit | 5f1a9ebbc159cb2cad9605777f92e0c73f4cee76 (patch) | |
tree | 9b50836e0fbce4cffa70a6a5b2dd3eccf520eee7 /gcc/varasm.c | |
parent | 8d142c15c918df6d30aebd44ad34f2700254c25c (diff) | |
download | gcc-5f1a9ebbc159cb2cad9605777f92e0c73f4cee76.tar.gz |
re PR middle-end/41257 (Bogus error '*.LTHUNK0' aliased to undefined symbol '_ZN1CD1Ev')
2009-09-04 Richard Guenther <rguenther@suse.de>
PR middle-end/41257
* (cgraph_finalize_compilation_unit): Move finalizing aliases
after emitting tunks. Move emitting thunks and ctors from ...
(cgraph_optimize): ... here. Remove redundant
cgraph_analyze_functions.
* varasm.c (find_decl_and_mark_needed): Remove no longer
necessary check.
(finish_aliases_1): Adjust check for thunk aliases.
* g++.dg/torture/pr41257.C: New testcase.
From-SVN: r151431
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index d7f861195ff..864ab16671f 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -5395,13 +5395,7 @@ find_decl_and_mark_needed (tree decl, tree target) if (fnode) { - /* We can't mark function nodes as used after cgraph global info - is finished. This wouldn't generally be necessary, but C++ - virtual table thunks are introduced late in the game and - might seem like they need marking, although in fact they - don't. */ - if (! cgraph_global_info_ready) - cgraph_mark_needed_node (fnode); + cgraph_mark_needed_node (fnode); return fnode->decl; } else if (vnode) @@ -5571,7 +5565,7 @@ finish_aliases_1 (void) to bind locally. Of course this is a hack - to keep it working do the following (which is not strictly correct). */ && (! TREE_CODE (target_decl) == FUNCTION_DECL - || ! TREE_STATIC (target_decl)) + || ! DECL_VIRTUAL_P (target_decl)) && ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl))) error ("%q+D aliased to external symbol %qE", p->decl, p->target); |