[Bug rtl-optimization/78778] non-atomic load moved to before atomic load with std::memory_order_acquire
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78778 --- Comment #4 from Erik Rigtorp --- Looks like this was fixed in trunk: https://godbolt.org/g/nxGRdm
[Bug c++/78778] New: non-atomic load moved to before atomic load with std::memory_order_acquire
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: erik at rigtorp dot se Target Milestone: --- Compiling this with GCC 5.1 and up with -O2 or higher for x86_64: #include #include int seqlock_load(std::atomic &seq, do