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] |
Notice the store of <j> *after* the store to <atomi>. I consider this a bug and have put this on my laundry list.
Seems plausible, though I don't know the details of the x86_64 memory model well enough to be sure that it would be possible to observe this reordering. But then, if your test fails I guess it is. :)
for (int i=0; i < SIZE; ++i) x[i].store(666, memory_order_relaxed);
This is the test in the attached atomics-3.C.
I don't think that's testing what you want to test; those stores are to the same array, but not to the same memory location.
Thanks for looking into this. Aldy
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |