https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108118
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #2) > Basically you have: > w = std::move(w); > > I think that is just undefined code at this point ... But I am not 100% sure. Nope, it's allowed. But it's not required to be a no-op. (In reply to Andrew Pinski from comment #3) > Unless https://cplusplus.github.io/LWG/issue2315 is not implemented ... That was done years ago: r5-4842-gf871d7f9f458d8