This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix variable symbol renaming
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 22 Aug 2013 17:06:43 +0200
- Subject: Fix variable symbol renaming
Hi,
this was noticed by the ODR verifier. For variables we get unique_name wrong
because we first bring it local and then test if it is global.
This makes the ODR unification based on aassembler name to go wrong.
Bootstrapped/regtested x86_64-linux, will commit it shortly.
* ipa.c (function_and_variable_visibility): First remember function was global
and then make it local.
Index: ipa.c
===================================================================
--- ipa.c (revision 201919)
+++ ipa.c (working copy)
@@ -968,10 +968,10 @@ function_and_variable_visibility (bool w
&& !vnode->symbol.weakref)
{
gcc_assert (in_lto_p || whole_program || !TREE_PUBLIC (vnode->symbol.decl));
- symtab_make_decl_local (vnode->symbol.decl);
vnode->symbol.unique_name = ((vnode->symbol.resolution == LDPR_PREVAILING_DEF_IRONLY
|| vnode->symbol.resolution == LDPR_PREVAILING_DEF_IRONLY_EXP)
&& TREE_PUBLIC (vnode->symbol.decl));
+ symtab_make_decl_local (vnode->symbol.decl);
if (vnode->symbol.same_comdat_group)
symtab_dissolve_same_comdat_group_list ((symtab_node) vnode);
vnode->symbol.resolution = LDPR_PREVAILING_DEF_IRONLY;