https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110213
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Reduced testcase: #include <utility> struct f { f(const f&); f(); }; struct g{}; g &search(f); void h() { f n; const g& pt (search (std::move(n))); }