[Bug middle-end/115802] Non-atomic load of static variable moved out of loop despite atomic fences

phosit at autistici dot org gcc-bugzilla@gcc.gnu.org
Sat Jul 6 14:06:23 GMT 2024


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

--- Comment #7 from Phosit <phosit at autistici dot org> ---
Yes you are right. There is a race because of the first access.
But your example also does that
>	while (!var)
>		fence();

... Whatever, there is certainly is a bug.


More information about the Gcc-bugs mailing list