This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: Fix PR58542, Arguments of __atomic_* functions are converted in unsigned mode


On 10/08/2013 11:37 AM, Uros Bizjak wrote:
> 
> As shown in the attached testcase, arguments of various __atomic
> builtins should be converted as signed, so the immediates get properly
> extended.
> 
> 2013-10-08  Uros Bizjak  <ubizjak@gmail.com>
> 
>     * optabs.c (maybe_emit_atomic_exchange): Convert operands as signed.
>     (maybe_emit_sync_lock_test_and_set): Ditto.
>     (expand_atomic_compare_and_swap): Ditto.
>     (maybe_emit_op): Ditto.
> 
> testsuite/ChangeLog:
> 
> 2013-10-08  Uros Bizjak  <ubizjak@gmail.com>
> 
>     * g++.dg/ext/atomic-2.C: New test.
> 
> Patch was bootstrapped and regression tested on x86_64-pc-linux-gnu {,-m32}.
> 
> OK for mainline and release branches?

This doesn't seem right at all.

The bug is that I gets set to UINT64_MAX, right?  Where's the
incorrect conversion from int to __int128_t?  Surely you can
produce a reduced test case that doesn't involve all of <atomic>
to show that.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]