https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78407
--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
The following patch fixes the issue
===================================================================
--- symtab.c (revision 244386)
+++ symtab.c (working copy)
@@ -1989,13 +1989,12 @@ symtab_node::equal_address_to (symtab_no
if (rs1 != rs2 && avail1 >= AVAIL_AVAILABLE && avail2 >= AVAIL_AVAILABLE)
binds_local1 = binds_local2 = true;
- if ((binds_local1 ? rs1 : this)
- == (binds_local2 ? rs2 : s2))
+ if (binds_local1 && binds_local2 && rs1 == rs2)
{
/* We made use of the fact that alias is not weak. */
- if (binds_local1 && rs1 != this)
+ if (rs1 != this)
refuse_visibility_changes = true;
- if (binds_local2 && rs2 != s2)
+ if (rs2 != s2)
s2->refuse_visibility_changes = true;
return 1;
}
the problem is that if one of symbols is interposable, we can not compare
symbols for equality by comparing their alias targets. I will think a bit if
this is too conservative.
Honza