Re: [PATCH] Fix c++/60272

2014-02-20 Thread Richard Henderson
On 02/20/2014 01:22 PM, Richard Henderson wrote: > On 02/20/2014 12:09 PM, Jakub Jelinek wrote: >> On Thu, Feb 20, 2014 at 11:49:30AM -0600, Richard Henderson wrote: >>> Tested on x86_64 and i686, and manually inspecting the generated code. >>> Any ideas how to regression test this? >> >> No idea a

Re: [PATCH] Fix c++/60272

2014-02-20 Thread Richard Henderson
On 02/20/2014 12:09 PM, Jakub Jelinek wrote: > On Thu, Feb 20, 2014 at 11:49:30AM -0600, Richard Henderson wrote: >> Tested on x86_64 and i686, and manually inspecting the generated code. >> Any ideas how to regression test this? > > No idea about how to test this. > >> @@ -5330,14 +5330,23 @@ ex

Re: [PATCH] Fix c++/60272

2014-02-20 Thread Jakub Jelinek
On Thu, Feb 20, 2014 at 11:49:30AM -0600, Richard Henderson wrote: > Tested on x86_64 and i686, and manually inspecting the generated code. > Any ideas how to regression test this? No idea about how to test this. > @@ -5330,14 +5330,23 @@ expand_builtin_atomic_compare_exchange (enum > machine_mo

[PATCH] Fix c++/60272

2014-02-20 Thread Richard Henderson
As described in the PR, we were performing an unconditional store back to the EXPECT parameter. This is fine, so long as EXPECT is not in thread shared memory, e.g. a local variable. But the example in the PR uses shared memory where the extra store introduces a race condition. I've left a note