https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91807
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Ville Voutilainen <vi...@gcc.gnu.org>: https://gcc.gnu.org/g:eb77f6f1b74aa200b70eb0a9e261c9f3b68294a0 commit r9-8716-geb77f6f1b74aa200b70eb0a9e261c9f3b68294a0 Author: Ville Voutilainen <ville.voutilai...@gmail.com> Date: Thu Jul 2 22:16:39 2020 +0300 PR libstdc++/91807 PR libstdc++/91807 * include/std/variant (_Copy_assign_base::operator=(const _Copy_assign_base&): Do the move-assignment from a temporary so that the temporary is constructed with an explicit index. * testsuite/20_util/variant/91807.cc: New. (cherry picked from commit dbca7a69f276e4829354f87f2747ebff36f6090e)