https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109353
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #4) > This doesn't help: > > --- a/libstdc++-v3/include/bits/vector.tcc > +++ b/libstdc++-v3/include/bits/vector.tcc > @@ -936,15 +936,25 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER > *__position = __x; > ++this->_M_impl._M_finish; > } > + else if (!this->_M_impl._M_start._M_p) yes, we can't CSE this load from the = nullptr assignment so we'd still diagnose the else case ...