https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100635
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:5d93261bc03c9c6891ccd8c77ab22b2a09971905 commit r12-849-g5d93261bc03c9c6891ccd8c77ab22b2a09971905 Author: Jonathan Wakely <jwak...@redhat.com> Date: Mon May 17 10:53:56 2021 +0100 c++: Fix diagnostic for binding lvalue reference to volatile rvalue [PR 100635] The current diagnostic assumes the reference binding fails because the reference is non-const, but it can also fail if the rvalue is volatile. Use the current diagnostic for non-const cases, and a modified diagnostic otherwise. gcc/cp/ChangeLog: PR c++/100635 * call.c (convert_like_internal): Print different diagnostic if the lvalue reference is const. gcc/testsuite/ChangeLog: * g++.dg/conversion/pr100635.C: New test.