https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110542
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #3) > + val = std::move(*__old_start); If this is changed to just val = *__old_start then the error comes back. 110542.cc: In function 'int main()': 110542.cc:23:25: error: non-constant condition for static assertion 23 | static_assert(test1() == 1); | ~~~~~~~~^~~~ 110542.cc:23:22: in 'constexpr' expansion of 'test1()' 110542.cc:18:7: in 'constexpr' expansion of 's.s_t::rz(2)' 110542.cc:11:49: in 'constexpr' expansion of '(& w)->std::vector<int>::resize(n)' /home/jwakely/gcc/14/include/c++/14.0.0/bits/stl_vector.h:1014:21: in 'constexpr' expansion of '((std::vector<int>*)this)->std::vector<int>::_M_default_append((__new_size - ((std::vector<int>*)this)->std::vector<int>::size()))' 110542.cc:23:25: error: use of allocated storage after deallocation in a constant expression