https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79743
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |DUPLICATE --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Денис Крыськов from comment #0) > all files mentioned in bug-report No, because you haven't provided a standalone program that can be compiled, because it includes gtest headers. Here's a standalone version, which fails with 6.2 and passes with 6.3: #include <experimental/optional> #include <string> #include <cassert> class Bread_and_butter { public: std::string bread; std::experimental::optional<bool> butter; Bread_and_butter(Bread_and_butter&& source); Bread_and_butter() noexcept : bread(), butter() {}; Bread_and_butter(const Bread_and_butter&) = delete; Bread_and_butter& operator=(const Bread_and_butter&) = delete; Bread_and_butter& operator=(Bread_and_butter&&) = delete; }; Bread_and_butter::Bread_and_butter(Bread_and_butter&& source) : bread(source.bread), butter(source.butter) { if(bread.size() >= 5) { butter = true; } if(bread.size() >= 10) { butter = false; } } int main() { Bread_and_butter s0; auto s1 = std::move(s0); assert(!s1.butter); } I think this is a dup of PR 77288 *** This bug has been marked as a duplicate of bug 77288 ***