[Bug target/59767] __atomic_load_n with __ATOMIC_SEQ_CST should result in a memory barrier

2015-07-09 Thread amacleod at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59767 Andrew Macleod amacleod at redhat dot com changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug target/59767] __atomic_load_n with __ATOMIC_SEQ_CST should result in a memory barrier

2015-07-06 Thread mikulas at artax dot karlin.mff.cuni.cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59767 --- Comment #5 from mikulas at artax dot karlin.mff.cuni.cz --- So, please pinpoint specific parahraph(s) in the standard that specify that this behavior is acceptable.

[Bug target/59767] __atomic_load_n with __ATOMIC_SEQ_CST should result in a memory barrier

2015-07-06 Thread mikulas at artax dot karlin.mff.cuni.cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59767 --- Comment #7 from mikulas at artax dot karlin.mff.cuni.cz --- #include stdatomic.h atomic_int a = ATOMIC_VAR_INIT(0); atomic_int b = ATOMIC_VAR_INIT(0); atomic_int p = ATOMIC_VAR_INIT(0); int thread_1(void) { atomic_store_explicit(b,

[Bug target/59767] __atomic_load_n with __ATOMIC_SEQ_CST should result in a memory barrier

2015-07-06 Thread amacleod at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59767 --- Comment #4 from Andrew Macleod amacleod at redhat dot com --- I'm not sure where the problem is. We interacted quite a bit as the model was being developed. As I recall, it started with the standard, but they strengthened some of the problem

[Bug target/59767] __atomic_load_n with __ATOMIC_SEQ_CST should result in a memory barrier

2015-07-06 Thread amacleod at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59767 --- Comment #6 from Andrew Macleod amacleod at redhat dot com --- The standard doesn't define what machines should generate what code. It defines terms for observing effects that need to be adhered to. Their machine model was created over a few

[Bug target/59767] __atomic_load_n with __ATOMIC_SEQ_CST should result in a memory barrier

2015-07-06 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59767 torvald at gcc dot gnu.org changed: What|Removed |Added CC||torvald at gcc dot gnu.org

[Bug target/59767] __atomic_load_n with __ATOMIC_SEQ_CST should result in a memory barrier

2015-07-06 Thread amacleod at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59767 Andrew Macleod amacleod at redhat dot com changed: What|Removed |Added CC||amacleod at

[Bug target/59767] __atomic_load_n with __ATOMIC_SEQ_CST should result in a memory barrier

2015-07-06 Thread mikulas at artax dot karlin.mff.cuni.cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59767 --- Comment #3 from mikulas at artax dot karlin.mff.cuni.cz --- The problem here is that we don't really know what does the standard specify. People often suggest the Batty's paper Mathematizing C++ Concurrency (

[Bug target/59767] __atomic_load_n with __ATOMIC_SEQ_CST should result in a memory barrier

2015-07-02 Thread jamrial at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59767 James Almer jamrial at gmail dot com changed: What|Removed |Added CC||jamrial at gmail