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

--- Comment #3 from Marc Mutz <marc.mutz at hotmail dot com> ---
One could argue that a memory barrier would need to remain when the seq_cst
implicit operator int() is called, even though the actual load of the variable
(and the variable itself) can be optimized out. But with load(relaxed), there
is no ordering, so there's no side-effect that would have to remain, so I don't
see what could stand in the way of the optimization.

Reply via email to