https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109801
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID CC| |rguenth at gcc dot gnu.org Status|UNCONFIRMED |RESOLVED --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- I see <bb 5> [local count: 966367642]: MEM[(struct __as_base &)&container] ={v} {CLOBBER}; MEM[(struct _Vector_impl_data *)&container] ={v} {CLOBBER}; MEM[(struct _Vector_impl_data *)&container]._M_start = _42; MEM[(struct _Vector_impl_data *)&container]._M_finish = __cur_30; MEM[(struct _Vector_impl_data *)&container]._M_end_of_storage = _37; MEM[(struct _Vector_impl_data *)&D.26141]._M_start = 0B; MEM[(struct _Vector_impl_data *)&D.26141]._M_finish = 0B; MEM[(struct _Vector_impl_data *)&D.26141]._M_end_of_storage = 0B; _7 = MEM[(type &)&container + 24]; <-- we diagnose this load MEM[(int &)&container + 24] = 0; MEM[(int &)&D.26141 + 24] = _7; that looks like the std::swap (size_, other.size_) going wrong. Or well, obviously size_ isn't initialized when table(table&& other) { std::swap(buckets_, other.buckets_); std::swap(size_, other.size_); } is run, only other.size_ is. So it's entirely your fault I think.