This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
- From: "amacleod at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 22 Nov 2011 16:07:52 +0000
- Subject: [Bug middle-end/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
- Auto-submitted: auto-generated
- References: <bug-51258-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258
--- Comment #4 from Andrew Macleod <amacleod at redhat dot com> 2011-11-22 16:07:52 UTC ---
I built a compiler in my linux box with a target of i386-apple-darwin.
during expanding an atomic_exchange it fails the call to
can_compare_and_swap_p(TImode, true).
It returns CODE_FOR_nothing for both cases:
icode = direct_optab_handler (atomic_compare_and_swap_optab, mode);
if (icode != CODE_FOR_nothing)
return true;
icode = optab_handler (sync_compare_and_swap_optab, mode);
if (icode != CODE_FOR_nothing)
return true;
so something in the config/i386/sync.md file must be wrong for a 32 bit
compiler which specifies -m64. It does not set up the optab table for a TI
mode compare_and_swap.