https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99664
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>: https://gcc.gnu.org/g:d04b0c75794545f1f7a942764285e21eaf2915a1 commit r12-2377-gd04b0c75794545f1f7a942764285e21eaf2915a1 Author: Patrick Palka <ppa...@redhat.com> Date: Fri Jul 16 16:21:10 2021 -0400 c++: covariant reference return types [PR99664] This implements the wording changes of CWG 960 which clarifies that two reference types are covariant only if they're both lvalue references or both rvalue references. DR 960 PR c++/99664 gcc/cp/ChangeLog: * search.c (check_final_overrider): Compare TYPE_REF_IS_RVALUE when the return types are references. gcc/testsuite/ChangeLog: * g++.dg/inherit/covariant23.C: New test.