This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/50683] GCC compiles MPFR 3.1.0 wrongly on sparc
- From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 16 Oct 2011 14:45:36 +0000
- Subject: [Bug target/50683] GCC compiles MPFR 3.1.0 wrongly on sparc
- Auto-submitted: auto-generated
- References: <bug-50683-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50683
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |davem at davemloft dot net
--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-10-16 14:45:36 UTC ---
Ugh, annoying linker relaxation bug. The compiler correctly generates:
add %l7, %l3, %l3, %tgd_add(__gmpfr_flags)
[...]
call __tls_get_addr, %tgd_call(__gmpfr_flags)
mov %l3, %o0
ld [%o0], %g1
but the linker turns this into:
0x00014d14 <+504>: add %g7, %o0, %o0
0x00014d18 <+508>: mov %l3, %o0
0x00014d1c <+512>: ld [ %o0 ], %g1
so segfault on the load.
Filed as http://sourceware.org/bugzilla/show_bug.cgi?id=13301 for the linker.
Should we put a workaround in the compiler?