This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Transparent alias suport part 3 (lto-symtab fixes)
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 8 Dec 2015 21:52:25 +0100
- Subject: Transparent alias suport part 3 (lto-symtab fixes)
- Authentication-results: sourceware.org; auth=none
Hi,
this patch fixes and ICE in symtab_node::verify_base when there is a missing
entry in the symol table - bug I noticed while debugging the patch.
Second fix makes symtab_node::noninterposable_alias to skip all transaprent
aliases because these can not change visibility. (this is needed because the
way we represent weakrefs as a static variable while it really inherits visibility
of its target that may be unknown)
Bootstrapped/regtested x86_64-linux, will commit it shortly.
* symtab.c (symtab_node::verify_base): Fix thinko in a conditional.
(symtab_node::noninterposable_alias): Do not accept transparent
aliases.
Index: symtab.c
===================================================================
--- symtab.c (revision 231425)
+++ symtab.c (working copy)
@@ -1005,7 +1005,7 @@ symtab_node::verify_base (void)
}
if (!hashed_node
&& !(is_a <varpool_node *> (this)
- || DECL_HARD_REGISTER (decl)))
+ && DECL_HARD_REGISTER (decl)))
{
error ("node not found in symtab assembler name hash");
error_found = true;
@@ -1637,7 +1637,7 @@ symtab_node::resolve_alias (symtab_node
bool
symtab_node::noninterposable_alias (symtab_node *node, void *data)
{
- if (decl_binds_to_current_def_p (node->decl))
+ if (!node->transparent_alias && decl_binds_to_current_def_p (node->decl))
{
symtab_node *fn = node->ultimate_alias_target ();