https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68718

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think the testcase is simply invalid, with or without OMP.  busy needs to be
volatile.

It's also an issue similar to that of the TM bugs that PTA / aliasing doesn't
consider non-address-taken vars as "aliased" but those can be still accessed
by multiple threads and thus the idea of using "aliasing barriers" for
thread related compiler-barriers doesn't work.

Note that using 'volatile' is not always a good answer.  For OMP 'busy'
should be an atomic load maybe?

Reply via email to