Hi,
this patch solves second problem seen on libreoffice build.  Here cgraph 
decides to output
alias, but because assemble_alias still contains the old alias pair path, it 
ends up adding
the alias pair that is later discarded and alias not output.

This will be cleaned up once I turn weakrefs to the new alias infrastructure. 
Hopefully
next week.

Honza

Bootstrapped/regtested x86_64-linux, comitted.

        PR other/49533
        * cgraphunit.c (assemble_thunks_and_aliases): Force alias to be output.
Index: cgraphunit.c
===================================================================
--- cgraphunit.c        (revision 178808)
+++ cgraphunit.c        (working copy)
@@ -1772,9 +1772,15 @@ assemble_thunks_and_aliases (struct cgra
     if (ref->use == IPA_REF_ALIAS)
       {
        struct cgraph_node *alias = ipa_ref_refering_node (ref);
+        bool saved_written = TREE_ASM_WRITTEN (alias->thunk.alias);
+
+       /* Force assemble_alias to really output the alias this time instead
+          of buffering it in same alias pairs.  */
+       TREE_ASM_WRITTEN (alias->thunk.alias) = 1;
        assemble_alias (alias->decl,
                        DECL_ASSEMBLER_NAME (alias->thunk.alias));
        assemble_thunks_and_aliases (alias);
+       TREE_ASM_WRITTEN (alias->thunk.alias) = saved_written;
       }
 }
 

Reply via email to