https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89831
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-8 branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:2b6565dd2d07d3f2f706795f800d0cc2ff8f2f68 commit r8-10077-g2b6565dd2d07d3f2f706795f800d0cc2ff8f2f68 Author: Jason Merrill <ja...@redhat.com> Date: Tue Feb 25 13:37:18 2020 -0500 PR c++/89831 - error with qualified-id in const member function. Since the fix for 15272 we were remembering the wrong function to use at instantiation time, because the type of the SCOPE_REF didn't reflect the cv-quals of 'this'. Conveniently, we can fix this by simplifying the code. gcc/cp/ChangeLog 2020-02-25 Jason Merrill <ja...@redhat.com> PR c++/89831 - error with qualified-id in const member function. * semantics.c (finish_non_static_data_member): Use object cv-quals in scoped case, too.