[Bug middle-end/104800] reodering of potentially trapping operations and volatile stores

muecker at gwdg dot de gcc-bugzilla@gcc.gnu.org
Wed Mar 9 07:42:57 GMT 2022


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

--- Comment #12 from Martin Uecker <muecker at gwdg dot de> ---
(In reply to Richard Biener from comment #10)
> Btw, with -ftrapv it would mean we cannot re-order any signed arithmetic
> with respect to volatile accesses unless we can prove it does not invoke
> (undefined,
> but -ftrapv makes it implementation defined) signed overflow.


Yes, and I think this would be desirable too. For example, if you safetly turn
off a machine with a volatile store, you want a later logic error in unrelated
code not to be able to prevent this.


More information about the Gcc-bugs mailing list