https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91859
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- Yes, but those optimizations are just doing what they are designed to do. I suspect that the bug is due to the front end inserting a CLOBBER that says it's ok for those optimizations to do that.