https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80640
--- Comment #4 from Nicolas Morey-Chaisemartin <nico...@morey-chaisemartin.com> --- I agree the volatile shoud fix thing> I'll have to see with the ompi guys to fix that. But shouldn't __atomic_thread_fence () have a side effect here and force the memory to be reloaded ? If it has no impact, what's the point ?