[Bug c/108298] Wrong optimization of volatile access from gcc 11 and beyond

daniel.lundin.mail at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Jan 5 11:29:02 GMT 2023


--- Comment #3 from Daniel Lundin <daniel.lundin.mail at gmail dot com> ---
(In reply to Segher Boessenkool from comment #2)
> This is not a dup of 33053 (see PR33053#c5 and PR33053#c6).  Reopening, and
> confirmed.  There should be a read from memory: that is a side effect, it has
> to be executed in the real machine as in the abstract machine.

This is however very much related to DR476 which is now implemented as per C23.
So conformance to DR476 should be on the C23 TODO-list.

More information about the Gcc-bugs mailing list