This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/47333] [4.6/4.7 regression] g++.dg/lto/20091219 FAILs on Solaris 2 with SUN as
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 06 Jan 2012 13:49:08 +0000
- Subject: [Bug target/47333] [4.6/4.7 regression] g++.dg/lto/20091219 FAILs on Solaris 2 with SUN as
- Auto-submitted: auto-generated
- References: <bug-47333-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47333
--- Comment #22 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-06 13:49:08 UTC ---
I think this is an ordering problem. When not using lto, assemble_alias
is called on the weakref __gthrw_pthread_once with pthread_once target (etc.)
early, from the FE which calls rest_of_decl_compilation, and when
ASM_OUTPUT_WEAKREF is not defined, this among other things sets
IDENTIFIER_TRANSPARENT_ALIAS (alias) = 1;
and TREE_CHAIN (alias) = target;
But the LTO FE doesn't call assemble_alias early, first emits assembly for the
routines, and only at the end calls output_weakrefs. Thus during assembly of
the functions we don't handle the weakrefs as transparent aliases.
Can't we just move up output_weakrefs before
cgraph_output_in_order/cgraph_expand_all_functions/cgraph_output_pending_asms?